PDA

View Full Version : Photopost 4.8.5 - Navbar Gallery dropdown only in Gallery


kall
12-18-2004, 10:00 PM
A-la http://gallery.nzboards.com :

In photopost/index.php

Find:


if ( is_numeric($argv[0]) ) {
header("Location: {$Globals['maindir']}/showphoto.php?photo={$argv[0]}");
exit;
}


Above, add:


define('THIS_SCRIPT', 'gallery');


Save and upload photopost/index.php

Then, in your navbar template add the following where you want the dropdown to appear (changing the yourdomain bit to the correct path):


<if condition="THIS_SCRIPT != 'gallery'"><td class="vbmenu_control"><a href="http://www.yourdomain.com/photopost">Gallery</a></td>
<else />
<td class="vbmenu_control" id="gallery"><a href="#gallery">Gallery Tools</a> <script type="text/javascript"> vbmenu_register("gallery"); </script></td>
</if>


Then find


<!-- NAVBAR POPUP MENUS -->


Under, add:


<if condition="THIS_SCRIPT == 'gallery'">
<!-- Gallery Dropdown Menu -->
<div class="vbmenu_popup" id="gallery_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead">Gallery Options</td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourdomain.com/photopost/index.php?$session[sessionurl]">Gallery Home</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourdomain.com/photopost/uploadphoto.php">Upload Images</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourdomain.com/photopost/member.php?uid=$bbuserinfo[userid]">My Gallery Profile</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourdomain.com/photopost/showgallery.php?cat=500&ppuser=$bbuserinfo[userid]">My Gallery</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourdomain.com/photopost/showgallery.php?cat=fav">My Favourites</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourdomain.com/photopost/search.php?$session[sessionurl]">Search Gallery</a></td></tr>

</table>
</table>
</div>
<!-- / Gallery Dropdown Menu -->
</if>


This will take effect on the main Photopost gallery page. If you want it to be effective on the other pages (photo upload etc), just add the define line to the top of each of the ones you want it to happen on.

Osterling
12-19-2004, 06:09 AM
Any screen shots?

HiDeo
12-19-2004, 10:07 AM
Yes, a screen could be fine !

SVTOA
12-19-2004, 03:39 PM
I added something similar to the USERCPSHELL template so that the upload photos link appears in the user's CPANEL options...

kall
12-19-2004, 04:32 PM
Yes, a screen could be fine !
Attached to first post.

Actually, it might be even better if in the Gallery, the link becomes 'Gallery Tools' or suchlike.

*edits it*

tteal
12-23-2004, 11:08 AM
Nice mod mate!