Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 06-16-2006, 06:08 PM
nudeyogi Offline
forum loafer
 
Join Date: May 2006
Posts: 5
Navbar addon -- need help please

Hi there, I'm programming illiterate. In fact, when I first downloaded Pixelpost a couple of months ago, I didn't even know what a style sheet was, so I've really come a long way. You Pixelpost developers are really great and you've inspired me...

That said...

I wanted a way to edit my site navigation in one place, without having to make changes on each and every template when I want to change the menu, so I decided to try creating a Navbar addon. I used some code from sensuous' Bookmarks Toolbar (sorry -- I'm learning through reverse engineering).

And the Navbar addon works, for the most part. It works great on my image_template, browse_template, about_template.

But for the life of me, I can't figure out how to get the Navbar to appear on pages I've created with the page_template from the MiniCMS addon, or pages I created beforehand that are just general.html documents.

Any ideas?

I'm also using the mod_rewrite for clean urls, if that makes any difference.

Here is the php code I'm using for the addon:

$navbar_top = <<<EOT
<div id="navbartop">
&bull;<a href="/page">page title</a> &bull;
<a href="/nextpage">nextpage title</a> &bull;</div>
EOT;

$tpl = ereg_replace("<NAVBAR_TOP>",$navbar_top,$tpl);

When I right-click on a page_template page to look at the page source in my browser, I see <NAVBAR_TOP> in the code, but the actual Navbar doesn't appear on the page.

Could someone be so kind to tell me what I'm doing wrong?

Thanks!
Reply With Quote
  #2  
Old 06-17-2006, 04:57 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
Ideal solution would be to use a theme which uses are header.html and footer.html instead of trying to modify every .html file
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote
  #3  
Old 06-17-2006, 04:58 PM
nudeyogi Offline
forum loafer
 
Join Date: May 2006
Posts: 5
Great idea -- thanks! Such a simple solution, and here I was trying to recreate the wheel.
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 12:49 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs