Customizing Extensions

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Customizing Extensions

Postby jfoster » Wed Jul 16, 2008 7:05 am

Hey so I was taking a look at customizing things for my template. I was wondering if there are plans to make separate tags for the extension to be included into tempmlates.

Right now if you enable the calendar, last.fm, and lifestream widgets they will all show up under the same tag allowing little customization other than the look of what the extension will spit out. Will we be able to customize that, is it in the works?

Thanks Jeff
jfoster
 
Posts: 32
Joined: Tue Jan 22, 2008 7:11 am

Re: Customizing Extensions

Postby Bob » Wed Jul 16, 2008 6:12 pm

Actually, you can use most widgets in normal templates. For instance, if you take a look at widget_lastfm.php, you'll see:

Code: Select all
// Register 'lastfm' as a smarty tag.
$PIVOTX['template']->register_function('lastfm', 'smarty_lastfm');


Which basically means that if you use [[ lastfm ]] in your templates, it will get replaced with the output of the smarty_lastfm() function.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Customizing Extensions

Postby jfoster » Sun Sep 07, 2008 11:57 am

Has anyone had any luck with this solution? I have tried the following two extensions as stand alone widget tags
Code: Select all
 [[ lastfm ]]   [[ lifestream ]]

Neither of these are working for me. The only way I can get widgets to show up is
Code: Select all
[[ widgets ]]

Do I need to enable anything to get these to work correctly?
jfoster
 
Posts: 32
Joined: Tue Jan 22, 2008 7:11 am

Re: Customizing Extensions

Postby hansfn » Tue Sep 09, 2008 8:45 pm

If you use [[widget]] some where in your template, you couldn't use [[ lastfm ]] or [[ lifestream ]] separately on the same page until the fix I just made - see revision 1440. However, if you don't have [[widget]] anywhere in your template, both [[ lastfm ]] or [[ lifestream ]] should work (and they do for me).
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Customizing Extensions

Postby jfoster » Tue Sep 09, 2008 9:01 pm

Thanks got it working now!
jfoster
 
Posts: 32
Joined: Tue Jan 22, 2008 7:11 am


Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 1 guest

cron