External PHP Application
External PHP Application
I'm using the 'External PHP Application' plugin to display a gallery and I'd like to assign a category to the page. Is this possible?
Cheers
Dave
Cheers
Dave
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: External PHP Application
Hi!
What would you like to achieve with that? Only entries can be assigned to categories, actually...
But if you tell me what you want to do with that, I might be able to tell you how to solve it differently
Regards
Garvin
What would you like to achieve with that? Only entries can be assigned to categories, actually...
But if you tell me what you want to do with that, I might be able to tell you how to solve it differently
Regards
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: External PHP Application
Hi Garvin
I hope that's clear
thanks
Dave
I'm using the sidebar hider to display a link of links (HTML nugget) when somebody clicks on the portfolio section of my website - the sidebar links are all different sections of the portfolio that use an external PHP gallery application. Because I can't allocate a category to the external PHP gallery pages the links are hidden again when the portfolio is being viewed. I'd like the links to be visible.garvinhicking wrote:Hi!
What would you like to achieve with that? Only entries can be assigned to categories, actually...
But if you tell me what you want to do with that, I might be able to tell you how to solve it differently![]()
I hope that's clear
thanks
Dave
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: External PHP Application
Hi!
Ah. I see.
Well, the short answer: It's not possible without much coding effort.
But the longer and more good answer: You can achieve it by editing your sidebar.tpl template file.
The you can add an IF-Statement like:
A tad dirty, but it works fast at last. 
Best regards,
Garvin
Ah. I see.
Well, the short answer: It's not possible without much coding effort.
But the longer and more good answer: You can achieve it by editing your sidebar.tpl template file.
The you can add an IF-Statement like:
Code: Select all
{if $item.title == 'Your title of the HTML nugget' && $staticpage_pagetitle != 'Your title of the external app'}
...show the plugin
{else}
...show nothing
{/if}
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi Garvin
I'd love to have made this work without coming back but I just couldn't
my sidebar.tpl now looks like this
permalink: /pages/gallery.html
my url shorthand name: 'Portfolio - design for print'
html nugget: Portfolio Links
so I'm guessing I've done something wrong
cheers - and thanks
Dave
I'd love to have made this work without coming back but I just couldn't
my sidebar.tpl now looks like this
Code: Select all
{if $is_raw_mode}
<div id="serendipity{$pluginside}SideBar">
{/if}
{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title != ""}<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
{if $item.title == 'Portfolio Links' && $staticpage_pagetitle != 'gallery.html'}
<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
</div>
{/foreach}
{if $is_raw_mode}
</div>
{/if}my url shorthand name: 'Portfolio - design for print'
html nugget: Portfolio Links
so I'm guessing I've done something wrong
cheers - and thanks
Dave
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Hm, try this instead:
I added some verbose text which you might want to remove when it works 
Regards,
Garvin
Hm, try this instead:
Code: Select all
{if $is_raw_mode}
<div id="serendipity{$pluginside}SideBar">
{/if}
{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title != ""}<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
{if $item.title == 'Portfolio Links' AND $staticpage_pagetitle == 'gallery.html'}
<div class="serendipitySideBarContent">This Nugget is hidden, because Portfolio Links are not visible in the gallery.</div>
{else}
<div class="serendipitySideBarContent">{$item.content}</div>
{/if}
</div>
{/foreach}
{if $is_raw_mode}
</div>
{/if}
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi Garvin
hmmm - my sidebar now looks like this screenshot and, unfortunately I still don't have my HTML nugget showing
cheers
dave
hmmm - my sidebar now looks like this screenshot and, unfortunately I still don't have my HTML nugget showing
cheers
dave
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Uh, that's weird. I wouldn't know where those "?" are coming from. Can you show me the URL to that, so that I could have a look at the HTML output?
Regards,
Garvin
Uh, that's weird. I wouldn't know where those "?" are coming from. Can you show me the URL to that, so that I could have a look at the HTML output?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
I'd say you did a bad copy+paste of the code or saved the file in UTF-16 Format inproperly? Try to do it again and save the file in ASCII/ANSI mode?
However, you will need to also set the HTML Nugget to display on all pages/categories now. You cannot restrict it to a category using the sidebarhider plugin anymore; you will need to exclude this plugin via the .tpl file.
Best regards,
Garvin
I'd say you did a bad copy+paste of the code or saved the file in UTF-16 Format inproperly? Try to do it again and save the file in ASCII/ANSI mode?
However, you will need to also set the HTML Nugget to display on all pages/categories now. You cannot restrict it to a category using the sidebarhider plugin anymore; you will need to exclude this plugin via the .tpl file.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi Garvin
don't know what we'd do without you
but it didn't work of course. Maybe I should stick to CSS?
cheers
Dave
don't know what we'd do without you
Thanks - it's great nowgarvinhicking wrote:I'd say you did a bad copy+paste of the code or saved the file in UTF-16 Format inproperly? Try to do it again and save the file in ASCII/ANSI mode?
how do I do that? I triedyou will need to exclude this plugin via the .tpl file.
Code: Select all
{if $item.title != "" AND $categories != 'portfolio' }<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
cheers
Dave
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
I think you cannot use $categories, I don't think this variable is declared. You might need to check a categoryid variable; please have a look in the variable documentation on www.s9y.org? Apart frmo that the check you did is the right direction
But you must pay attention where you add this if() check, because you are currently putting it into the if-clause of the item.title output. But what you want is to block the output if item.content instead (like in the code snippet I gave you)
Best regards,
Garvin
I think you cannot use $categories, I don't think this variable is declared. You might need to check a categoryid variable; please have a look in the variable documentation on www.s9y.org? Apart frmo that the check you did is the right direction
But you must pay attention where you add this if() check, because you are currently putting it into the if-clause of the item.title output. But what you want is to block the output if item.content instead (like in the code snippet I gave you)
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
No problem, just have a try. If you don't manage anything, just come back here next week with your latest code version, and we'll sort it out together.
Best regards,
Garvin
No problem, just have a try. If you don't manage anything, just come back here next week with your latest code version, and we'll sort it out together.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi Garvin
I got close but no cigar! My sidebar.tpl now looks likewhich is great - it shows the link list in the portfolio section. Unfortunately it no longer shows the links on the gallery pages with the embedded application. I tried every variation of his code I could think of hoping not to be back here this morning, but here I am.
cheers
Dave
I got close but no cigar! My sidebar.tpl now looks like
Code: Select all
{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem container_{$item.class}">
{if $category_info.categoryid != '2' AND $item.title == 'Portfolio Links'}
<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>
<a href="#">click here to go to our portfolio</a>
{else}
{if $item.title != "" }<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
{if $item.title == 'Portfolio Links' AND $staticpage_pagetitle == 'gallery.html' }
<div class="serendipitySideBarContent">This Nugget is hidden, because Portfolio Links are not visible in the gallery.</div>
{else}
<div class="serendipitySideBarContent">{$item.content}</div>
{/if}
{/if}
</div>
{/foreach}
{if $is_raw_mode}
</div>
{/if}cheers
Dave