PDA

View Full Version : PhotoPost vBTemplates 4.1.x/4.5.x


AJR
11-28-2003, 10:00 PM
PhotoPost vBTemplates Hack v4.5
for vBulletin 2.2.7 through 2.3.x
and PhotoPost 4.1.x or PhotoPost 4.5
THIS IS NOT FOR VB3!

Created by: AJR (arusso@vpforums.com)
Installer by: Bane

Comments and suggestions welcome!

What this hack does:
====================
If you have PhotoPost (www.photopost.com) installed along with
vBulletin, you're stuck with only 1 template style using the
.tmpl files that come with PhotoPost. This hack allows you to
make your gallery look more like the vBulletin style you're
using by pulling the vBulletin style/replacement settings.
Best of all, if you use multiple styles, each style can have
it's own templates for PhotoPost.

With PhotoPost 4.5 there is now the option to create different .tmpl
template sets which is great, but to keep up with 2 configurations
for colors and styles can be a pain.

This hack also changes the way postbit data in the comments are
displayed. The date is shown like vBulletin (May 2003 instead of
5/2003). Also, the code is included for showing the user's
avatar in the comments!

Examples:
=========
Visit the following links for different style settings:

Techie: http://www.vpforums.com/gallery/index.php?styleid=1
XP: http://www.vpforums.com/gallery/index.php?styleid=2
iMac: http://www.vpforums.com/gallery/index.php?styleid=3
Bluechrome: http://www.vpforums.com/gallery/index.php?styleid=4
Utopia: http://www.vpforums.com/gallery/index.php?styleid=5
Techb1: http://www.vpforums.com/gallery/index.php?styleid=6
Tech Forums v3: http://www.vpforums.com/gallery/index.php?styleid=7
Photon: http://www.vpforums.com/gallery/index.php?styleid=8


Version 4.5 - December 2, 2003
==============================
- This version has been updated for use with PhotoPost 4.5. If you are using 4.1.x be sure
to choose the proper version from the install

Templates Added:
- pp_showphoto_showubb

Templates Changed:
- pp_bulkupload
- pp_featurebit
- pp_login
- pp_searchbox
- pp_membhead
- pp_showgallery
- pp_showphoto
- pp_showphoto_extra6
- pp_showphoto_noslideshow
- pp_uploadphoto
- pp_uploadphoto_adminedit

Files Changed:
- bulkupload.php
- pp-inc.php
- showphoto.php


Version 4.1.5 - November 28, 2003
=================================
- This is the first release of this hack. I have tested everything
as best as I can and everything should work correctly. The version
numbering will go along with PhotoPost's version number that it is
tested with.
- Converted all .tmpl files to vB Templates
- Changed the way the 'Registered:' date shows up (shows May 2003 instead of 5/2003)
- Included code to show the users avatar when they comment on a photo.
- menubar.tmpl and diewell.tmpl still need to remain in case of errors within PhotoPost.
- Created install_pptemplates.php file to install the 127 templates needed for this hack.

Installation:
=============
The install of this hack is relatively easy. There are 17 Photopost files and 1 vBulletin
file that need to be edited. While this may seem like a lot, it's just replacing all the
calls from the .tmpl files to the new pp_ templates. Please make sure to follow each file
change carefully. If you have errors after the install, check the file changes again! It
does work. Install time is approximately 15 to 20 minutes.

I will be working on a version to work with the new PhotoPost 4.5.x that was just released on 11-20-2003. I WILL NOT be working on versions of this hack for use with vB3. If anyone would like to convert this to vB3, please do so!

11-29-03 1:35AM PST: Just noticed an error on the template install that I uploaded (it was the wrong one). It has been fixed and reuploaded.

12-2-03 12:30AM PST: Updated this hack for PhotoPost 4.5.x (also includes install for 4.1.x). Download the zip file in this post for the updated version.

corsacrazy
11-29-2003, 07:42 AM
nice wrk u hav done there mate ;)

doh @ Powered by: PhotoPost (http://www.photopost.com/) PHP 3.2 :(

jjj0923
11-29-2003, 09:25 AM
great idea - I'll be waiting on the 4.5 version since that's what I'm running.

- jeff

SVTBlackLight01
11-29-2003, 10:56 AM
great idea - I'll be waiting on the 4.5 version since that's what I'm running.

- jeff

Me too.

Rampag33
11-29-2003, 03:00 PM
Excellent been waiting on this for a long time.

***installs***

Harlequin
11-30-2003, 08:38 PM
I've done a little bit of this myself but not quite this extensive. Definitely waiting on the 4.5 verison.

PixelFx
12-01-2003, 01:47 AM
looks cool, good job :) I'm working on intergrated update as well but this looks really nice,. I'm currently using the latest photoshop release 4.5.1 .. any updates planned? :)

Rampag33
12-01-2003, 03:56 AM
I love the hacc but think the intructions could be a lil more clear kinda jumbled together

AJR
12-01-2003, 04:10 AM
I thought I made it easy, and don't know what else to add to the install instructions. I'll try and clarify:

1. From the zip file, upload the admin/install_pptemplates.php file to your forums/admin directory

2. In your browser, type the path to the install_pptemplates.php (eg http://www.domain.com/forums/admin/install_pptemplates.php)

3. Choose one of the following:
- 'new install' - installs the templates and then shows the file hacks to make
- 'file hacks' - View the files hacks that need to be done to the files (if you've already run the new install but need to see the file hacks again).
- 'uninstall' - remove the pp_ templates (NOTE: this will only remove the
default templates marked with a -1 in the templates table)

4. After making all the file hacks to the 17 photopost files and 1 vB file, upload the 18 files to your server where they need to go.

5. Delete all the photopost/templates/*.tmpl files EXCEPT menubar.tmpl and diewell.tmpl

6. Delete the install_pptemplates.php in your forums/admin directory after the install is complete.

The 'New Install' option will install the templates as default (-1) for all your themes installed. If you want to customize the templates for a more complex theme, go to your vBulletin Admin, choose Modify, choose Expand for the theme, and you will see the 'PhotoPost Templates' in the list.

Hope this helps.

AJR
12-02-2003, 06:32 AM
An update for those waiting for the PhotoPost 4.5.x version of this hack has been posted in the first post of this thread!

oly51
12-02-2003, 09:03 AM
Nice work, AJR!!!

Harlequin
12-04-2003, 11:20 PM
I've given AJR a PM concerning this, but I thought I'd post the problem here and I'd update whenever I found out what the solution was in case anyone else is having this same problem. :)

I run Photopost 4.5 [test] and a vBulletin 2.3.2 test board. On my test board, the strangest thing is happening when I install this -- the templates act as if they're displaying, but there's no data output to fill the tables from Photopost at all.. no images, no image info, notta. x.x;

To get a little more specific in detail, the tables display compressed -- as in, only a few pixels high. It's the effect of the tables not having any data to display other than {firstaltcolor} for a bg color or what have you.

I'm rather curious as to why this is. I've installed all of the file edits and, using the installer, also installed the templates. I think I've done everything in my power with this install.

Are there any others receiving this problem or am I just looney? ;) I think I'd better note here that I don't run vBPortal [so therefore I don't use the vBPortal header in the Photopost setup]. I think that may be important to know in the case that there's a function or something similiar that this hack would require in order to possibly display the data.


I'll play with reinstalling it fresh a little later on, but I wanted to see if this wasn't just my problem. And thanks AJR -- from the screenshots, this looks wonderful.

therisen
12-05-2003, 07:07 PM
I had this same problem. What I found out that was when I installed the templates via the install script it did not insert some of the data for the templates. To work around this issue I exported my style and added the new templates to it with the style script in the download. I then uploaded the modified style and everything was fine.

Harlequin
12-05-2003, 09:02 PM
Excellent! I'll try that a little later on! Thank you.

<EDIT>

This fix worked like a charm! Thank you thank you thank you. :)

Imhotep
12-06-2003, 04:05 PM
I have the exact same problem. I did exactly as therisen did and pasted the new templates to the style script and uploaded it. I have one more task to complete... so my question is this... where do I find the "number of templates" indicator so that I can add 127 to the total?

thanks...

MPDev
12-06-2003, 07:11 PM
I'm putting the finishing touches on an integration hack for PhotoPost/vB:

http://www.photopostdev.com

should have that ready in the next day or so.

Imhotep
12-06-2003, 07:24 PM
Sounds great... Does this mean I will have to uninstall this template hack? I like the look of photopostdev.com. If that's how PP integrates... then I say let's go for it. :)

MPDev
12-06-2003, 11:23 PM
I don't think so; the integration I did only requires two lines to be added to the vB side (one include and one variable insert in the template - two variable inserts if you want to seperate the features from the galleries like I did).

Imhotep
12-07-2003, 12:01 AM
Awesome!

to anyone else reading this thread, I am still unable to get the PP tables to show. Where do I find this so-called "number of templates" indicator? I searched the manual with no luck.

Harlequin
12-07-2003, 04:30 AM
At the top of the vbulletin.style file that vBulletin allows you to download, you'll find something similiar to:

2.3.2|||xx|||default|||xx|||22|||141|||{tableborde rcolor}||........

See the 141? In your file, it'll be different obviously, but add 127 to that number and boom, there you go. It's more than likely the higher number.

Atleast, that worked for me with no visible hiccups.

Remember to add your templates to the bottom of that file and upload.

Also, make sure you've uninstalled the templates already if you've tried installing them with the installer that comes with this hack.

Imhotep
12-07-2003, 02:53 PM
Harlequin,

Thanks for the info on the template counter. That piece of info is most definitely not intuitive! I RTFM and found nothing relating to the counter.... and I don't understand why we're expected to pick that up through osmosis.

jjj0923,

Apparently, you have the same problem that I had last night. Read my posts and the reply from Herlequin. Which version of vB and PP are you running? You www link points to viagra.com. Somehow I suspect that's not the site you're working on.

jjj0923
12-07-2003, 05:14 PM
Harlequin,

Thanks for the info on the template counter. That piece of info is most definitely not intuitive! I RTFM and found nothing relating to the counter.... and I don't understand why we're expected to pick that up through osmosis.


jjj0923,

Apparently, you have the same problem that I had last night. Read my posts and the reply from Herlequin. Which version of vB and PP are you running? You www link points to viagra.com. Somehow I suspect that's not the site you're working on.
I'm using vb 2.9 and pp 4.5

the url is correct - however the vb & pp are hidden and for internal use.

- jeff

Imhotep
12-07-2003, 05:32 PM
You're running v2.9, eh? That interesting considering the latest stable release is 2.3.3 and from there it's going to go straight to 3.0. Where'd you find a version 2.9?

I think what AJ is trying to tell you is that you have not yet editied the header-inc.php file in PP root. I believe this will solve your problem. (In addition to installing the templates correctly)

This is what you need to uncomment in header-inc.php



// vBulletin Integration
// Instead of using the static header/footer file specified in the Admin options
// panel, you can use your existing default vBulletin header/footer. Just change
// $vbpath and $pppath below to the proper full paths and remove the "//" slashes
// from the beginning of the 17 lines of code below. If PhotoPost has an odd
// background color or squished width, you will need to edit vbulletin's default
// "header" style input box / template and change "{pagebgcolor}" and "{tablewidth}"
// (near the bottom) to your preferred background color and table width, respectively.

//$vbpath ="/full/path/to/forum"; // changeme
//$pppath ="/full/path/to/photo"; // changeme
//chdir($vbpath);
//require("global.php");
//ob_start();
//eval("dooutput(\"".gettemplate('headinclude')."\",0);");
//$bodytag="<body>";
//echo dovars($bodytag,0);
//$vbheader="<head>";
//$vbheader.=ob_get_contents();
//$vbheader.="</head>";
//ob_end_clean();
//ob_start();
//eval("dooutput(\"".gettemplate('header')."\",0);");
//$vbheader.=ob_get_contents();
//ob_end_clean();
//ob_start();
//eval("dooutput(\"".gettemplate('footer')."\",0);");
//$vbfooter=ob_get_contents();
//ob_end_clean();
//chdir($pppath);



As for installing the template hack correctly, do not use the provided installer. It's got some issues. :) If you used it, just use it again to uninstall the templates. From there, download your style file and add the contents of "ppstyle 4.5.txt" before the final set of pipes "|||" in the style file. Use the CP to upload/overwrite the newly edited style.

With any luck this will solve your problem.

Like I said before, your bug is (was) the same as mine. It can be worked out if you just have a little patience.

jjj0923
12-07-2003, 05:58 PM
I just did that - no luck.
I did use the provided installer.
the variable in pp_index are not getting set - however gettemplate is not failing any longer - like the rest of you - it just seems as though the templates are not being read at all.

ps: where can I find the ppstyle 4.5.txt file?

- jeff

jjj0923
12-07-2003, 06:08 PM
I downloaded the style.

then I took the contents that your specified and inserted them before that last ||| in the original style file.

save it and uploaded it using the uploade style set and the import ran correctly.

however none of the pp_ templates show up in the template list.

- jeff

AJR
12-07-2003, 06:17 PM
The first line of every template file should look something like this:

2.3.2|||name|||name|||name|||23|||116|||

- The first number is the vBulletin version numer it was made for.
- The name name name are the Style, Replacement, and Template set names.
- The 23 is the number of Replacements to add
- The 116 is the number of Templates to add

You would add 127 (v4.1.x) or 128 (v4.5.x) to 116 = 243

The above is an example of what to do. Numbers are going to be different in every style file, but the format stays the same!

jjj0923
12-07-2003, 06:24 PM
The first line of every template file should look something like this:

2.3.2|||name|||name|||name|||23|||116|||

- The first number is the vBulletin version numer it was made for.
- The name name name are the Style, Replacement, and Template set names.
- The 23 is the number of Replacements to add
- The 116 is the number of Templates to add

You would add 127 (v4.1.x) or 128 (v4.5.x) to 116 = 243

The above is an example of what to do. Numbers are going to be different in every style file, but the format stays the same!


this is what mine looks like.

2.2.9|||Default|||Default|||Default|||23|||362|||{ timecolor}|||#000000|||{textareacols_IE}|||60|||{p agetextcolor}|||#000000|||{linkcolor}|||#000000||| {hovercolor}|||#0000FF|||{categoryfontcolor}|||#FF FFFF|||{pagebgcolor}|||#FFFFFF|||{tableheadtextcol or}|||#FFFFFF|||{firstaltcolor}|||#FFFFFF|||{table headbgcolor}|||#235CDA|||<body>|||<body bgcolor="#215AD6" text="#000000" id="all" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000020" vlink="#000020" alink="#000020" background="{imagesfolder}/j2.gif">|||{tableouterborderwidth}|||0|||{tablebordercolor }|||#000000|||{categorybackcolor}|||#235CDA|||{tit leimage}|||http://www.viagra.com/upload/images/t2.jpg|||{secondaltcolor}|||#A3BFF9|||{contenttabl ewidth}|||100%|||{tablewidth}|||100%|||{tableinner borderwidth}|||1|||{textareacols_NS4}|||60|||{text areacols_NS6}|||60|||{htmldoctype}|||<!DOCTYPE HTML PUBLIC\"-//W3C//DTD HTML 4.01 Transitional//EN\">|||{imagesfolder}|||http://www.viagra.com/upload/images|||911|||{htmldoctype}


so - you're saying that not only do I have to paste the new file in at the end of the file beofre the final ||| but I also have to change the number in the first line?

is that correct?

- jeff

jjj0923
12-07-2003, 06:27 PM
therefore I would paste in your new stuff at the end of this file and change the 362 in the header to 490 (add 128) ???

jeff

jjj0923
12-07-2003, 06:32 PM
I'm about to just give up on this.

I added your file at the end.
I added 128 to the nuber at the top.
I used to function in admin to upload it and no pp_ templates are showing up.

this seems like more trouble than it's worth to be honest.

Imhotep
12-07-2003, 06:34 PM
so - you're saying that not only do I have to paste the new file in at the end of the file beofre the final ||| but I also have to change the number in the first line?

is that correct?


According to the installation instructions provided with the hack, yes, that is correct with regards to changing the number of templates.

AJ, I missed the part where I add an additional 1 to the number of templates. I am running PP 4.5.1. I will add that extra 1 to the counter, but I am curious, what exactly is the purpose of the counter?

Imhotep
12-07-2003, 06:38 PM
I'm about to just give up on this.

I added your file at the end.
I added 128 to the nuber at the top.
I used to function in admin to upload it and no pp_ templates are showing up.

this seems like more trouble than it's worth to be honest.



You, sir, never answered my question. Did you or did you not use the installer to uninstall the templates?! This is critical! From everything you have written, it looks to me like you have not uninstalled yet. If you have a PhotoPost group in your templates list, then you have not uninstalled.

AJR
12-07-2003, 06:59 PM
The purpose of the counter is to tell vBulletin how many Replacements and Templates to add to the templates table. Since the only distinction is the ||| separators, it adds the first number to the Replacements and the second number to the Templates. If it only says 116 Templates when there are actually 243, then it won't add them all.

Imhotep, in your comment above about uninstalling the templates...

You need to run the install script whether you're adding the custom templates to your style file or not. The install script adds the templates as Global Default (-1). Then when you add your custom templates per style and upload the style, it will add them as the templatesetid. You probably won't need custom templates for all your styles, so the Global Default templates kick in so you don't get a blank page.

jjj0923, as soon as I get things done with my server, I'll PM you and help you out as best as I can.

jjj0923
12-07-2003, 09:13 PM
finally - got it done and running.

now it's time to work on the templates...

- jeff

Imhotep
12-07-2003, 09:44 PM
and the fix was..... ?

SWFans.net
12-08-2003, 04:09 AM
I finally got this working by manually entering one set of templates and correcting a typo in the instructions, then using TBS to export/import the proper templates to all of my other template sets.

The typo is in step three of the showgallery.php modifications:

Change:

pp_showgallery_showsomments

to

pp_showgallery_showcomments


I tried to attach a set of the corrected templates exported with Chen's Template Backup System so those who use TBS can import/export them as they see fit, but cannot get attachments to work using Mozilla Firebird. I will try it with IE and see if it works. x_x.

Ahh, attaching with IE worked. :D

MPDev
12-08-2003, 01:37 PM
I've uploaded my mods for adding PhotoPost featured images and galleries to the FORUM HOME page. Unfortauntely, I only have vB Gamma running, so thats the layout I did it for.

orca
12-09-2003, 08:40 AM
Does this work with vbPortal? It doesn't on my site. It only shows the footer of the gallery but not the gallery itself. I double-checked the file modifications. The URL is http://www.arachid.org/gallery

SWFans.net
12-09-2003, 12:07 PM
Does this work with vbPortal? It doesn't on my site. It only shows the footer of the gallery but not the gallery itself. I double-checked the file modifications. The URL is http://www.arachid.org/galleryI have vbPortal and this installed. All is working properly as per my last post.

orca
12-09-2003, 07:33 PM
Ok, that worked. Should have checked the templates before posting...

Imhotep
12-09-2003, 10:41 PM
I have vbPortal and this installed. All is working properly as per my last post.


How did you get your PhotoPost to intergrate so nicely? I run vB 2.3.2 un der vBPortal 2.3 and mine looked like it's missing a table... or something. Did you have to add anything special?

orca
12-10-2003, 05:20 PM
See post https://vborg.vbsupport.ru/showpost.php?p=450980&postcount=35. You really need to check all templates. Or update all templates with the content of the zip in the mentioned post.

Imhotep
12-10-2003, 05:40 PM
checking them out now... thanks! going to look into this "chen's template importer" too. :)

gmarik
12-14-2003, 07:00 AM
I like to like it!

Imhotep
12-14-2003, 01:06 PM
See post https://vborg.vbsupport.ru/showpost.php?p=450980&postcount=35. You really need to check all templates. Or update all templates with the content of the zip in the mentioned post.


ok... so how do I update the templates from the ZIP file? I can't find this so-called template importer.

obsidian
12-17-2003, 01:45 AM
I am running this hack on Vbportal with Photopost 4.5. I upgraded to photopost 4.5 and then installed the hack. I had a couple of the previously mentioned problems which were worked out with the previously mentioned fixes. I have been beating my head against the wall on a new problem for about a week with no results. My problem is that all of the links are colored blue on all my themes except one. I have spent hours comparing the templates for the non working themes to the working theme but have not found anything. It looks like it is also messing with the background. Any help would be greatly appreciated. The link to the site is http://austinairsoft.com/photopost/index.php

Harlequin
12-17-2003, 03:45 AM
obsidian:

Your problem is pretty simple and it isn't that uncommon. After taking a gander at your linked page's source, I found a <link right in the middle of your page which is [more than likely] causing your problem.

View your page and find it. It looks like this:

<link rel="stylesheet" href="http://austinairsoft.com/photopost/stylesheets/default.css" type="text/css" />

It'll be a quarter or so down the html source. So that tells me it's at the top of the Photopost templates.

All in all, you probably need to edit that css stylesheet according to the rest of your site [without { } colors] or delete the <link rel=""> from the top of your Photopost vB templates.

** EDIT:

Actually, hell. I just glanced. The HTML setup starts over about halfway down the file -- are you using another header with the pp templates?

Shell Geeks
12-17-2003, 04:49 AM
I just installed it with PP 4.1 and vB 2.2.

Parse error: parse error in /home/vb2-test/public_html/gallery/forums/vb2.php on line 201

Fatal error: Call to undefined function: authenticate() in /home/vb2-test/public_html/gallery/index.php on line 30

obsidian
12-17-2003, 01:26 PM
Thanks Harlequin..... I thought that the stylesheet might be the problem but I could not find it anywhere. It was not in the style anywhere and I started digging through files looking for it. In the end I just ended up deleting the default.css file and it works perfectly.

Great Hack. Perfect for Vbportal where tons of themes are possible.

MPDev
12-17-2003, 06:00 PM
I just installed it with PP 4.1 and vB 2.2.

That's a pretty old version - why not use a more current version?

Shell Geeks
12-18-2003, 09:41 AM
opps my message was cut, it's vB 2.2.9 Also Photo post is PhotoPost PHP 4.1.1 to be exact.

liquidblaze
12-19-2003, 06:04 PM
anyone can tell me if this works with 4.6 too?

orca
12-22-2003, 02:41 PM
ok... so how do I update the templates from the ZIP file? I can't find this so-called template importer.

Well, I also didn't have the importer...so I updated all templates by copy&paste using the vBulletin template system in the admin area. A bit of work but it was wortn it.

orca
12-22-2003, 02:42 PM
anyone can tell me if this works with 4.6 too?

Hmm, no idea. Would be nice, though. Need to check the change log. But I guess you need to do any file modifications again. At least for the files which changed from 4.5.1 to 4.6.

obsidian
12-22-2003, 06:33 PM
anyone can tell me if this works with 4.6 too?

I have it running with VBportal and PP 4.6. Did everything manually and it worked like a charm.

gmarik
12-28-2003, 03:55 PM
Is the 4.6 out allready?

oly51
12-28-2003, 05:32 PM
It was released on 12/17....

recumbent615
12-29-2003, 12:50 PM
All,

I just installed it on 4.6 last night, works very well. There are two addtional templates in 4.6 ppopen and ppclose that do not have VB telmates to replace them so you need to leave them in the template directoy. I had renamed my stylesheets and TEmplates folders and fould that in 4.6 there were two new templates being called.

As this was my second install, I just dumped my template table that included all of the pp_% templates and then ran the sql commands directly on the new v4.6 install. Much easier than editing each one by hand. I have attached my sql command for those of you who are comfortable with SQL to use it.

Kevin

recumbent615
01-01-2004, 01:34 AM
Ok I have found an issue, and it seems to be related to this hack, but I have not unhacked to see if it works, I'm running both 4.6 and 4.5.x of PP and the latest full release of VB/VBPortal. the issue shows up in the form of not representing the catagories and sub-cats as in this is how the cat and sub cat appear when setup in the admin :


main cat [1]
sub cat [1]
sub cat [2]
second cat [2]
sub2 cat [1]
sub2 cat [2]
third cat [3]
sub3 cat [1]
sub3 cat [2]


and shown in PP index.php looks like this


main cat [1]
sub cat [1]
sub cat [2]
second cat [2]
sub2 cat [1]
sub2 cat [2]
third cat [3]
sub3 cat [1]
sub3 cat [2]


now the catagory does now show up ( second cat and third cat ) when you click on main cat.

http://www.kmb.com/image1.jpg
http://www.kmb.com/image2.jpg

Kevin

recumbent615
01-01-2004, 03:37 PM
Here's An Update on this problem:

I have been looking at this problem since last night ( WOW what a way to ring in the New Year) or as my kids would say "what a nerd" in a loving kind of way. I have determined that it is this Hack that has caused the problem and just to prove to my self I reinstalled PP without this hack and pointed it at the same data and it works... or should I say that it correctly represents the hierarchyof the Catagories.
Here's a screen shot of the unhacked PP;

http://www.kmb.com/image3.jpg

The Offending Code seems to be in index.php.


Anybody seen this issue or is it just me? If it is just me can anyone tell me where to look to correct this error.

Thanks.

And Happy New Year's From Boston.

Kevin

recumbent615
01-02-2004, 12:20 AM
Ok,

After determining a fix for this issue this morning, and making a typo that make it look like the fix didn't work I found my typo and now have this fixed.

In the index.php file find:

}
$details .= "$detail";
}
}
eval("\$pp_categories = \"".gettemplate('pp_categories')."\";");



and change it to this:


}
$details .= "$detail";
$indent = '';
}
}
eval("\$pp_categories = \"".gettemplate('pp_categories')."\";");




as it turns out the data in $indent was never cleared so after you indented one subcatagory all following catagories were indented as much as the last one.

I love this Hack. Make my Photopost look just like evey other page on my site. Thank you AJ for making this It's tops.

Kevin

Etcher
01-09-2004, 07:41 AM
Installed... Took twice to do it, but I found that I was also trying to use the supplied installer the first time... Without it I had it up in no time...
Works perfect with the default theme, but is having a little trouble with the font color and mouse over on the other one...
Other than that it is working well...

Great job, and needed by most of us...

sawalton1964
01-10-2004, 12:58 PM
Having problems with the photopost login and search buttons at http://www.globalphotosite.org/photopost/index.php

login ->> Fatal error: Call to undefined function: gettemplate() in /home/sites/site29/web/photopost/login-inc.php on line 23

search ->> Warning: main(/home/sites/site29/web/photopost/templates/search.tmpl) [function.main]: failed to create stream: No such file or directory in /home/sites/site29/web/photopost/search.php on line 43

Warning: main() [function.main]: Failed opening '/home/sites/site29/web/photopost/templates/search.tmpl' for inclusion (include_path='.:/usr/lib/php') in /home/sites/site29/web/photopost/search.php on line 43

Also when I looked at Techie: http://www.vpforums.com/gallery/index.php?styleid=1
from the first post the problem is there too.

Etcher
01-10-2004, 01:21 PM
'/home/sites/site29/web/photopost/templates/search.tmpl' for inclusion
it should not be calling that file...

Do you have another hack in there?

Lines 23 logininc.php
eval("\$pp_menubar = \"".gettemplate('pp_menubar')."\";");
eval("dooutput(\"".gettemplate('pp_login')."\");");

I am thinking that you have made a mistake somewhere...
Look over it again and check for typo's
Also what version on PhotoPost?

recumbent615
01-10-2004, 01:57 PM
Etcher,

I was going to say the same thing until I re read the post. The Error at line 23 is looking for and not finding gettemplate ( a vb routine ) define in admin/functions.php.

Be sure that you have all the correct information in the pp/header-inc.php file for VB integration.

Kevin

recumbent615
01-10-2004, 02:06 PM
sawalton1964,

The error's that you are seeing in search.php are due to the fact that that is a new file since this hack was created and is sitll looking for the PP templates. there are a few templates that will need to be put back in to the template directrory until this hack is adapted for the new search funtions. ... Just find the old templates and copy them back into the PP/templates dir. that will get the search function working, but it will not look as nice as the rest of the integration.

Kevin

recumbent615
01-10-2004, 02:25 PM
Here's the first step in updating the search.php file

On line 42 of search.php

find:

include( "$PP_PATH/templates/menubar.tmpl" );
include( "$PP_PATH/templates/search.tmpl" );
printfooter();


Replace with:


## include( "$PP_PATH/templates/menubar.tmpl" );
eval("\$pp_menubar = \"".gettemplate('pp_menubar')."\";");
include( "$PP_PATH/templates/search.tmpl" );
printfooter();


and dont forget to put search.tmpl back in the PP/templates directory

Kevin

sawalton1964
01-10-2004, 06:32 PM
Ok, decided to revert to a non-moded gallery for the time being, the owner has plans to re-brand the site and hopefully a photopost 4.6 VBulletin 2.3.4 (or better ;) ) version is out by the time he makes up his mind.

Cheers, keep up the good work

JustCurious
01-15-2004, 06:31 PM
I deleted the templates with the exception of those two and got about 4 errors plus a fatal error. I reuploaded the templates and now all of the errors are gone except the fatal which is: Fatal error: Call to undefined function: gettemplate() in /home/xxxx/public_html/gg/index.php on line 171

Any ideas? This is line 171 in index.php: eval("\$pp_online = \"".gettemplate('pp_online')."\";");

I don't see pp_online anywhere and I'm sure where it came from.

Thanks in advance.

JustCurious
01-15-2004, 06:34 PM
And what is this telling me during install?

You need to make changes to the following vBulletin files:
template.php (1 change) [groups PhotoPost templates in cp]

recumbent615
01-16-2004, 12:44 AM
JustCurious,

How did you install the New templates? Did you use the install script provided with the hack? It has been reported several times in this thread that it does not work correctly, I have provided the sql commands in a file to add the templates and another poster has included a text based template set you can either open each template and cut and paste or you can use Chen's template backup hack ...

pp_online is one of the templates provided by this hack. I would suggest that you down load the zip file that contains the template backups and verify that you have all of the templates installed correctly.

As far as your post #69 open /forums/admin/templates.php


$only['pagenav'] = 'Page Navigation';
$only['pp_'] = 'PhotoPost';
$only['poll'] = 'Polling';
$only['postbit'] = 'Postbit';


add the second line there between Page Navigation and Polling

I hope this helps.

Kevin

JustCurious
01-16-2004, 03:36 AM
I apologize for not reading the entire thread before posting. I assumed the installer worked or otherwise would've been removed from the hack until it was fixed.

Thanks for your help, I'll give it a try.

JustCurious
01-16-2004, 03:49 AM
JustCurious,

How did you install the New templates? Did you use the install script provided with the hack? It has been reported several times in this thread that it does not work correctly, I have provided the sql commands in a file to add the templates and another poster has included a text based template set you can either open each template and cut and paste or you can use Chen's template backup hack ...

pp_online is one of the templates provided by this hack. I would suggest that you down load the zip file that contains the template backups and verify that you have all of the templates installed correctly.

As far as your post #69 open /forums/admin/templates.php


$only['pagenav'] = 'Page Navigation';
$only['pp_'] = 'PhotoPost';
$only['poll'] = 'Polling';
$only['postbit'] = 'Postbit';


add the second line there between Page Navigation and Polling

I hope this helps.

Kevin

My file looks exactly like this but still not working.

JustCurious
01-16-2004, 04:49 AM
k, I went through and manually added all the templates and checked all the suggestions given above. Everything went much smoother this time, but I'm still getting this:

Fatal error: Call to undefined function: gettemplate() in /home/xxx/public_html/xx/index.php on line 171

Line 171 is: eval("\$pp_online = \"".gettemplate('pp_online')."\";");

Thanks in advance.

recumbent615
01-16-2004, 04:01 PM
You may want to verify the edits in the header-inc.php file for the VB integration for VB2 or VB3. This also provides calls to the VB global.php that includes the def of the gettemplate() function. this error can occur when this file are not edited. Just a thought .. other than that... I'm lost to a degree.

Kevin

( also I'm assuming that you are running VB2.x not VB3 )

JustCurious
01-16-2004, 11:22 PM
Yes VB 2.3.4

recumbent615
01-17-2004, 12:10 AM
Here is the code in Header-inc.php that you need to check for and uncomment


// -----> START VB2 CODE (uncomment lines down to END VB2) <-----
$vbpath ="/full/path/to/forum"; // changeme
$pppath ="/full/path/to/photopost"; // changeme
chdir($vbpath);
require("global.php");
ob_start();
eval("dooutput(\"".gettemplate('headinclude')."\",0);");
$bodytag="<body>";
echo dovars($bodytag,0);
$vbheader="<head>";
$vbheader.=ob_get_contents();
$vbheader.="</head>";
ob_end_clean();
ob_start();
eval("dooutput(\"".gettemplate('header')."\",0);");
$vbheader.=ob_get_contents();
ob_end_clean();
ob_start();
eval("dooutput(\"".gettemplate('footer')."\",0);");
$vbfooter=ob_get_contents();
ob_end_clean();
chdir($pppath);
// -----> END VB2 CODE (do not uncomment) <-----

Mickie D
01-22-2004, 11:30 AM
hi i was wondering about this hack and it seems very good hack but i have one simple question :)

if i change my style in vbulletin will it change the style so photopost has the same ???

obsidian
01-22-2004, 12:07 PM
Yes it will. The hack makes it so photpost will use the vbulletin templates so when you switch vbulletin photopost follows suit. I have about 6 themes on my site so this was a godsend.

recumbent615
01-22-2004, 03:50 PM
I t works that way for me, Check the Style # for the PP_ styles and I believe that if they are set to -1 they will follow into every one of your styles.

Deska
01-22-2004, 04:10 PM
is this work with vB 2.3.4 and Photopost v4.6.5 ?
Thank's....

Walab
01-23-2004, 07:05 PM
If anyone was wanting to modify the search.php file to read from vbulletin templates rather than photopost templates, and doesn't know how to, I did it for you. I added four modified vbulletin templates and modified the photopost file. Since I thought the vb3 RC2 style looks rediculously ugly, I made it look similar to the vb2 style. Here's what I had done, I'll try to make everything as clear as possible.

- Add four new templates
-- pp_search
-- pp_results_top
-- pp_results_mid
-- pp_results_btm
- Modify two php file
-- search.php
- /languages/english/search.php

Template: pp_search
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="2"><normalfont color="{categoryfontcolor}"><b>{$Globals['pp_lang']['searchg']}</b></normalfont></td>

</tr><form method="post" action="{$Globals['maindir']}/search.php">
<tr>
<td bgcolor="{tableheadbgcolor}" valign="top"><smallfont color="{tableheadtextcolor}"><b>{$Globals['pp_lang']['keyword']}</b></smallfont></td><td bgcolor="{tableheadbgcolor}" valign="top"><smallfont color="{tableheadtextcolor}"><b>{$Globals['pp_lang']['searchuser']}</b></smallfont></td>

</tr><tr>
<td bgcolor="{firstaltcolor}" align="left" valign="top"><smallfont><br>
<input type="text" name="keywords" size="35" class="bginput">
<br><br>
<b>Basic query:</b>
separate your search terms with spaces.<br>
<br>
</smallfont>
</td><td bgcolor="{firstaltcolor}" align="left" valign="top"><smallfont>
<br>
<input type="text" name="name" class="bginput" size="25">
<br></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="3"><normalfont color="{categoryfontcolor}"><b>{$Globals['pp_lang']['within']}</b></normalfont></td>

</tr><tr>

<td bgcolor="{tableheadbgcolor}" valign="top"><smallfont color="{tableheadtextcolor}"><b>{$Globals['pp_lang']['catsearch']}</b></smallfont></td><td width="45%" bgcolor="{tableheadbgcolor}" valign="top"><smallfont color="{tableheadtextcolor}"><b>{$Globals['pp_lang']['daterange']}</b></smallfont></td>

</tr><tr>
<td bgcolor="{firstaltcolor}" rowspan="2" align="left" valign="center"><smallfont>
<select name="cats[]" class="bginput" multiple size="10">
<option value="all" $seltext>{$Globals['pp_lang']['allcats']}</option>
$catoptions
</select>
</td><td bgcolor="{firstaltcolor}" valign="top" align="center"><smallfont>
<br><p>
<input type="text" name="when" size="3" class="bginput" />
<select name="whenterm" class="bginput">
<option value="">any date</option>
<option value="d">{$Globals['pp_lang']['day']}</option>
<option value="w">{$Globals['pp_lang']['week']}</option>
<option value="m">{$Globals['pp_lang']['month']}</option>
<option value="y">{$Globals['pp_lang']['year']}</option>
</select>
</p></smallfont></td></tr>
<tr>
<td bgcolor="{firstaltcolor}" colspan="2" valign="top"><smallfont>
<br>
<table><td><smallfont>
<input type="radio" name="what" value="title" class="formboxes">
{$Globals['pp_lang']['whichkeys1']}
<br>
<input type="radio" name="what" value="titledesc" class="formboxes">
{$Globals['pp_lang']['whichkeys2']}
</smallfont></td><td><smallfont>
<input type="radio" name="what" checked="checked" value="allfields" class="formboxes">
{$Globals['pp_lang']['whichkeys3']}
<br>
<input type="radio" name="what" value="comments" class="formboxes">
{$Globals['pp_lang']['whichkeys4']}
</smallfont></td></table>
<br>
<input type="checkbox" name="preview" value="yes" checked="checked" class="formboxes" />
{$Globals['pp_lang']['preview']}
<br></smallfont>
</tr>
</tr>
</table></td>
</tr>
</table>

<br>

<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td align="center"> <input type="submit" name="final" value="{$Globals['pp_lang']['execute']}" class="bginput"> <input type="reset" class="bginput" name="reset" value="{$Globals['pp_lang']['reset']}"></td>
</tr></form>
</table>

Template: pp_results_top
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat" align="center">
<td bgcolor="{categorybackcolor}" colspan="2"><normalfont color="{categoryfontcolor}"><b>$comcount {$Globals['pp_lang']['results']}</b></normalfont>
</tr>


Template: pp_results_mid
<tr bgcolor="$bgcolor">
<td width="175" align="center" valign="top" nowrap="nowrap">
<normalfont>{$thumbrc[$x]}<b>{$ucuser[$x]}</b></normalfont><br />
<smallfont>{$imgdate[$x]} <font color="{timecolor}">{$imgtime[$x]}</font></smallfont>
</td>
<td width="100%" valign="top">
<normalfont>{$commenttext[$x]}</normalfont>
</td>
</tr>

Template: pp_results_btm
<tr>
<td bgcolor="{tableheadbgcolor}" colspan="2" valign="top" align="right">
<smallfont>$more</font>
</td>
</tr>
</table></td>
</tr>
</table>

File Modification: search.php

Find:
include( "$PP_PATH/templates/menubar.tmpl" );
include( "$PP_PATH/templates/search.tmpl" );

Replace with:
$templatesused='pp_menubar,pp_search';

eval("dooutput(\"".gettemplate('pp_menubar')."\");");

eval("dooutput(\"".gettemplate('pp_search')."\");");

Find:
include( "$PP_PATH/templates/menubar.tmpl" );
include( "$PP_PATH/templates/search-r.tmpl" );

Replace with:
$templatesused='pp_menubar,pp_search,pp_results_to p,pp_results_mid,pp_results_btm';

eval("dooutput(\"".gettemplate('pp_menubar')."\");");

eval("dooutput(\"".gettemplate('pp_results_top')."\");");

for( $x=0; $x < $itemnum; $x++ ) {
$bgcolor = ($counter++ % 2 == 0) ? "{firstaltcolor}" : "{secondaltcolor}";

eval("dooutput(\"".gettemplate('pp_results_mid')."\");");

}

eval("dooutput(\"".gettemplate('pp_results_btm')."\");");

File Modification: /languages/english/search.php

Select All; Replace with,
<?
$Globals['pp_lang']['badcall'] = "Script not called correctly. Navigate to a specific photo, then click on the edit link.";
$Globals['pp_lang']['closed'] = "We're sorry, but our Photo Boards are currently down for maintainence. Please try again later.";
$Globals['pp_lang']['searchg'] = "{$Globals['galleryname']} Search Engine";
$Globals['pp_lang']['instruct'] = "Fill in the fields below to execute a search.";
$Globals['pp_lang']['catsearch'] = "Select Categories";
$Globals['pp_lang']['s_instruct'] = "You can search one category, all or select multiple categories from the list below.";
$Globals['pp_lang']['keyword'] = "Search By Keyword";
$Globals['pp_lang']['whichkeys1'] = "Search title only";
$Globals['pp_lang']['whichkeys2'] = "Search title and description";
$Globals['pp_lang']['whichkeys3'] = "Search all fields";
$Globals['pp_lang']['whichkeys4'] = "Search comments";
$Globals['pp_lang']['searchuser'] = "Search By Username";
$Globals['pp_lang']['daterange'] = "Specify A Date Range";
$Globals['pp_lang']['within'] = "Search Options";
$Globals['pp_lang']['day'] = "day(s)";
$Globals['pp_lang']['week'] = "week(s)";
$Globals['pp_lang']['month'] = "month(s)";
$Globals['pp_lang']['year'] = "year(s)";
$Globals['pp_lang']['execute'] = "Preform Search";
$Globals['pp_lang']['reset'] = "Reset Fields";
$Globals['pp_lang']['allcats'] = "All Categories";
$Globals['pp_lang']['searching'] = "Performing Search";
$Globals['pp_lang']['results'] = "result(s) to your search.";
$Globals['pp_lang']['preview'] = "Show thumbnails in comment search";
?>

That's all, upload the updated search.php files, and give me feedback.

Updated Feb.24
Alternating colors in comment search
Updated template for search page
Added another replacement ['reset'] in language file

Updated Mar.06
Added time color to comment search

recumbent615
01-24-2004, 12:03 AM
Very Nicely Done... Works very well...

Kevin

Mickie D
01-24-2004, 10:38 PM
any ports to vb3 for this ?

Fargo
01-27-2004, 06:28 PM
This is perfect!! thank you!

Mickie D
02-04-2004, 01:01 PM
ok i will port this to vb3 if i have permission to do so :)

give me a few days so i can test it all out :)

NSeXcellent
02-15-2004, 01:02 PM
Any idea if this works for PP4.6.x ??

Rampag33
02-22-2004, 03:26 PM
Well a vb3 port be out soon?

AJR
02-22-2004, 10:04 PM
Any idea if this works for PP4.6.x ??

I will hopefully be working on a version for 4.6.x soon. They've made quite a few changes from 4.5.x to 4.6.x so I have to go through every line of code to check what has changed.

Well a vb3 port be out soon?

I will not be using vB3 for awhile so I will not do the port for vB3. I know a few people in this thread have said they will port it to vB3, so all I can say is to PM them to see what the status may be.

AJ

smokkinjoe
06-24-2004, 07:56 PM
Is the port to 4.6.x working yet looking forward to using it if you are still working on it.

Joe