vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   PP Classifieds 2.0+ - Use seperate VB Header and Navbar (https://vborg.vbsupport.ru/showthread.php?t=73249)

trackpads 12-22-2004 10:00 PM

PP Classifieds 2.0+ - Use seperate VB Header and Navbar
 
This is close to my other PP hack which shares the same premise. I want to acknowledge the 2nd navbar idea which was given to me by using atroll's Additional Navbar hack. If you use this please click install on his aswell:

https://vborg.vbsupport.ru/showthread.php?t=65198

>>>---------------------------->

Software needed:

VB 3.03 (may work on others, didnt test)
Photopost Classifieds 2.0+ or higher (may work on others, didnt test)

>>>---------------------------->

What it does & why:

On my site I have a standard navigation system set up on the site and while I loved the new integration that comes with PP Classifieds and I wanted to keep the Classifieds gallery with its own seperate identity without losing the integration features like style sheets and others. So using atrolls hack as a guide I create both a seperate VB Header and Navbar for my PP Classifieds.

You can see it in action here:
My Forum: http://www.trackpad.com/forum
My Product Reviews: http://www.trackpads.com/classifieds

>>>---------------------------->

Here is how you do it:


Step 1 - Create/Edit New Templates

You will need to create 2 new templates in your VB style(s) that you use. First thing is to open your current header & navbar templates and copy the information as a basis for your new ones. Save them in txt files or wherever for the moment.

A. Create a new template called headerc and paste the information from the original header. Make any classifieds specific modifcations that you want. You can always come back later through and edit the file.

B. Create a new template called navbarc and paste the information from the original navbar. Make any classifieds specific modifcations that you want. You can always come back later through and edit the file.

When this step is complete you should have 2 new custom templates called headerc & navbarc.

C. Edit your phpinclude_start template and add the following anywhere in the file:

Code:

eval('$navbarc = "' . fetch_template('navbarc') . '";');
eval('$headerc = "' . fetch_template('headerc') . '";');

>>>---------------------------->

Step 2 - File Edits


VB File Edits:

A. Since the template is uncached you will have an extra query on each page. To fix, open global.php and FIND:

Code:

// misc useful
ADD BELOW:

Code:

'navbarc',
'headerc',


PP Classifieds File Edits:

Please note that you should have already integrated and tested your Classifieds installation with the VB integration first. Ensure that the VB header & navbar are both showing.

A. Open the file header-inc.php and FIND:

Code:

eval('$navbar = "' . fetch_template('navbar') . '";');
And REPLACE with the following:

Code:

eval('$navbarc = "' . fetch_template('navbarc') . '";');

B. In the same file FIND:

Code:

$vbheader .= "</head>
<body>
$header
$navbar
<div align=\"center\">";

And REPLACE with:

Code:

$vbheader .= "</head>
<body>
$headerc
$navbarc
<div align=\"center\">";


>>>---------------------------->


Finally. Save all files and upload to the server. REMEMBER, always make a backup in case something is wrong so you can just re-upload the original without de-hacking the file.

Again, no screenshots are attached. Just look at the differences on my forum and classifieds. If you have any questions please ask, I am no expert though but I will try to help you. Please clickty click install if you like and use. It will make my day :) :)

sross 09-16-2005 06:58 AM

I really needed this thanks man!

LICryptkeeper 12-28-2005 06:13 AM

does not work on 3.5 (tested)

there are some changes needed, most notabaly phpinclude_start is no longer there, so you have to create a new plugin in global_start and add the lines there.

seconly, there is 2 instances of haderc in the pp:c file, bot hneed to be changed.

all in all i have it working a TAD, but it breaks my layout. I'm not asking for support here, since this is a 3.0 forum, just letting anyone know its incompatible with 3.5


All times are GMT. The time now is 08:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01033 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete