Creating Custom Pluslets

56 views
Skip to first unread message

Robbie G.

unread,
Jun 13, 2011, 1:01:51 PM6/13/11
to SubjectsPlus
Hello,

I am having a difficult time creating custom pluslets.

I have read the directions for advanced customization as well as what
others have done,
but I am have some big issues.

Whenever I follow the advanced customization directions my pluslet
won't show up. I can change the type to
special and it will show up, but then disappears when I try to use it
(indicating an error, but I see no coding errors).

I tried a different way, which was creating templates from what had
already been created, but when I post my code
I can't escape the quotes (so i get my code repeated to me) or it will
post outside of the pluslet box. It's always one or the other.

Can anyone who has created custom pluslets before offer up a quick
walk through?

Andrew Darby

unread,
Jun 13, 2011, 2:02:39 PM6/13/11
to subjec...@googlegroups.com
Hi Robbie,

I'm afraid the documentation is still a bit sparse.

Can you give some more specifics of what you were trying to customize?
I was planning to do a little documentation today/tomorrow, so if you
could give a semi-detailed account of what you are aiming for, I can
try to write a walk-through.

Andrew

> --
> You received this message because you are subscribed to the Google Groups "SubjectsPlus" group.
> To post to this group, send email to subjec...@googlegroups.com.
> To unsubscribe from this group, send email to subjectsplus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/subjectsplus?hl=en.
>
>

Robbie G.

unread,
Jun 13, 2011, 3:10:19 PM6/13/11
to SubjectsPlus
Ok, so after a little more tweaking I am finding that my problem is
displaying PHP created content within my pluslet.

It looks more or less like there is an issue on my end as far as
displaying PHP within my html.

I can't find a lot of helpful stuff about this; How would I go about
inserting an include called mailer.php in there or adding in a php
date that would display within the pluslet along with the form? This
is not actually what I am doing,
but is a simple version of the concept I am working on.

$this->_body = '
<form id="form1" name="form1" method="post" action="">
<label>email address
<input type="text" name="email" id="email" />
</label>
</form>
';

I apologize that this isn't quite what I was originally wanting. Any
help would be appreciated.

Andrew Darby

unread,
Jun 13, 2011, 3:23:30 PM6/13/11
to subjec...@googlegroups.com
Hi Robbie,

You should be able to add more to the body by sticking more onto the
$this->_body like so:

$this->_body .= "today's date is " . date('l jS \of F Y h:i:s A');

As for doing an include, you could try what they suggest here:

http://www.desilva.biz/php/ob_start.html

I just tried adding the following to sp_Pluslet_5.php (after the big
$this->_body chunk) and it worked:

ob_start(); # start buffer
include_once( '../../readme.txt' );
# we pass the output to a variable
$html = ob_get_contents();
ob_end_clean(); # end buffer
$this->_body .= $html;

I don't know if this is the optimal solution, but like I said, worked
for me just now . . . .

Andrew

p.s. I am working on documenting how to make a simple custom pluslet,
the always popular inserting a meebo widget.

Andrew Darby

unread,
Jun 13, 2011, 4:27:59 PM6/13/11
to subjec...@googlegroups.com
As promised, here are some instructions on how to make a custom
pluslet (albeit a pretty basic one):

http://www.subjectsplus.com/wiki/index.php?title=Creating_a_Custom_Pluslet:_Meebo_Widget

Robbie G.

unread,
Jun 13, 2011, 3:31:32 PM6/13/11
to SubjectsPlus
It worked! Thank you!

jonathan_L

unread,
Jan 15, 2013, 9:59:26 AM1/15/13
to subjec...@googlegroups.com

Hello,

I tried to create a personalized Pluslet (following the instructions in the Wiki) to display my news visually from my Wordpress blog (see http://codex.wordpress.org/Integrating_WordPress_with_Your_Website).

So I created an external PHP file using the function:

ob_start () # start buffer
include_once ('wordpress_news.php');
# We pass the output to a variable


$ html = ob_get_contents ();

ob_end_clean () # end buffer
$ this-> _body. = $ html;


But I constantly get a Fatal error: require_once () [function.require]: Failed opening required 'classes / Translation_Entry.php'.

Maybe there's an easier way to display my news feed?

Jonathan

Andrew Darby

unread,
Jan 15, 2013, 10:09:06 AM1/15/13
to subjec...@googlegroups.com
What about using the Delicious/RSS/Flickr/Twitter box/boite type?  Drop that into your guide, enter your details, it should show the information from your news feed.  See attached image.


To view this discussion on the web visit https://groups.google.com/d/msg/subjectsplus/-/2Huaoo9T0GIJ.
rss_boite.jpg
Reply all
Reply to author
Forward
0 new messages