UBB.Dev
Mod Name / Version: Photopost Integration Version 3

Description: This modification allows UBBThreads and Photopost to be a seamless integrated product. It pulls the Threads headers and stylesheet around Photopost allowing your site to flow flawlessly.

Working Under: UBB.Threads 6.2-6.3

Mod Status: Finished

Any pre-requisites: Must own UBBThreads and Photopost.

Author(s): Omegatron

Date: 05/31/03

Credits: Gardener for help with a Global file option so I could get the new admin frameset to display.

Files Altered: adm-inc.php, comments.php, editphoto.php, reportphoto.php, showphoto.php, showgallery.php, pp-inc.php, index.php, uploadphoto.php


New Files: None

Database Altered: No

Info/Instructions: Backup your files before modifing!!!!!

I feel pretty confident of this mod being finished. It has been around for a couple of versions of each product with no known bugs other than application error of the modification.

One known issue was related to a server issue not allowing the tbopen and tbclose variables to be read.

Many people have expressed hardship in reading Beyond Compare reports as I have always done to save time with the intense changes that need to be done. I have taken the extra time and done away with those and made a normal txt file for all to follow.



Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.




Attached File
Thanks Chuck - is this just for PP4?
It should be backward compatible for version 3.3 but just incase there is still the version 2 mod which were made for it. The code of this hack has not changed through the versions. The reason it should be compatable backward compatable with 3.3 is easy. 3.3 uses the class calls already just like 4.0. 3.2 is totally different as it still used the Global color calls from the photopost admin section so you would be looking for entirely different text.

The main reason I posted this was this:

1)Photopost released there new version today.

2)Many people had difficulty reading the Beyond Compare difference reports which was mainly laziness on my part having to cut and paste exact code from 8-9 different files as this is a rather lengthy integration.

There is one main difference with this version over the others. Version 4 of Photopost has a new frameset in the admin section. There is a new global statement to exclude two admin files from the hack to disallow the header so the admin frameset will load and also a minor alteration to one admin file for specifying stylesheet to use for the excluded files as a purely cosmetic issue.
thanks Chuck
Oh Yeah I had real fun with the FRAMESET Thanx to Gardener for putting me on track with GLOBAL EXCLUDES.
Thanks Chuck!

FYI - the issue with the tbopen and tbclosed not working I believe it solved by turning off Zlib compression in either threads or photopost. You can Zlib compress stuff twice.... I think that's where the problems were.
Cool Glad to hear it was solved. I guess you mean you CAN'T use zlib compression twice.
Oops - yes, you can't compress the stuff twice.

If PP is using compression and trying to send compressed threads headers - you don't get any output. You, me and Allen strugged over that one for quite a while once.
Yep I am glad you figured that one out.

My latest fun was getting the new admin frameset to display as this hack interrupted that until the framset was excluded.
Awesome hack Chuck, one of the biggest things I've needed to do to my site to get the look I wanted

Everything seems to be working great, except one tiny little detail. See the attached photo... notice the threads menu bar at the top and how it doesn't have a border around the text.

For some reason, all of the PP items, noted with the red arrow, have a box or button look to them. Just trying to figure out how to get rid of those

Attached picture 85274-almostthere.jpg
Jeremy quite literaly that is the HTML coding and not this hack for the short answer. I beleive that is your tablesurround on the Threads TBOPEN AND TBCLOSE variables. Match that color and see. Try modifying your variables in tbopen.tmpl

The class for the menu and menu2 variables is set in pp-inc.php and thus has no tbopen and tbclose tags around it and will not do this. Hense you notice that border is around any table that calls the wrappers.
I figured it out.. but it isn't because of tbopen and close, it is a conflict with the menubar class. For example, here is my .menubar settings:

Code
.menubar{ <br />background-color: #336699; <br />border-color: #C0CAE2 #24278E #24278E #C0CAE2; <br />border-style: solid; <br />border-width: 1px; <br />color: #ffffff; <br />font-size: 11px; <br />font-weight: normal; <br />}


Now.. notice the border-color, this makes the left and top borders the light color, and the bottom and right dark, to produce the 3D effect you can see in that image I attached above, look at the threads menubar and you see how it works.

The problem is, it seems as if the class=menubar is being called twice in the photopost menu, the first one makes the whole box look like it should, as you can see. But then it looks like this class is also being called for the table that holds the nav links.

So if people aren't using this CSS effect, it looks fine, so that's why it probably hasn't been noticed before I don't know if this is something you want to address, as it probably affects only myself right now, but if not, could you point me to the right file(s) to try and change this? Would be appreciated Thanks!
Actually, I guess I'm not as stupid as I thought, I'm picking up on this hacking stuff a bit better I fixed it by changing this in pp-inc.php

Code
Find: <br /> <br /> <br />    $menu = "<font class=\"menubar\">"; <br />    $menu2 = "<font class=\"menubar\">"; <br /> <br /> <br />Replace with: <br /> <br /> <br />    $menu = "<font class=\"\">"; <br />    $menu2 = "<font class=\"\">"; <br />


Or if you want, just make a new class for the photopost menu, but I found just simply taking the class out of it causes it to display properly

EDIT:

Also noticed one more spot this can be changed if you're having problems, in index.php:

[]</td><td align="right" class="menubar"><b>{$Globals['pp_lang']['keywords']}  </b></td><td><input type="radio" name="stype" value="2">
</td><td align="right" class="menubar"><b>{$Globals['pp_lang']['username']}  </b></td><td align="right">
<input type="text" name="si" style="font-size: 8pt;" size="15" value="" />
<input type="submit" value="Search" style="font-size: 9pt;" />
</td></tr><tr><td colspan="6" align="right" class="menubar">[/]

Just remove the menubar, or replace with a special ppmenubar class you make, and everything should work fine
Hmm.. this is going to take longer than I had thought. The index page looks great, but there are quite a few other areas that I need to work on.

Most importantly, which I find very odd, is showmembers.php. Every other PP page the photopost menu looks correct. But for some reason showmembers.php isn't. So because the menubar class was removed from pp-inc.php, the links on that page are completely invisible as the table isn't assigned any class Why only that script? I dunno.
Actually Jeremy the easiest thing to do is assign tdheader instead of MENUBAR. I did not change any CSS classes Michael assigned in Photopost. This hack does what it is suppose to do. CSS can be a tricky thing and change from site to site. I really have no control over what people put in their I can assist with resolving specific problems though.

Showmembers.php I will need to look at Michael finally worked on that I guess. It used to be a purely Threads script.
Its cool, I got it all taken care of (although took about 4 hours with my limited skills ) But what I ended up doing was just creating a new class for those problematic menu items, then going through and replacing the parts that needed to be replaced.

I thought about just using the tdheader, but I kinda liked the blue of the menubar instead

As far as showmembers, I just took part of the menu code that was used for showgallery, and replaced some junk that was in there and it seemed to work

So everything should be all squared away. I just hope photopost doesn't release a new version again until it comes with built in threads CSS matching
LOL The CSS classes you added to every threads stylesheet match the ones listed in Threads. What is funny is you commented on the border pixels on menubar. Well I have them as well but it is a non-issue as if you set them to your darktable class it match's If you view mine you see what I mean. Showmember.php is easy I will add that to the instructions. Never had to worry about that one before as it was a threads script.
Ahh.. lordy lordy, I suppose that could have been avoided if they matched the darktable. But oh well, sometimes you have to learn things the hard way, lol. It was good to poke around and be forced to learn more though

I guess that's what I get for giving up coffee..
No you can't give up coffee
I know, it seems impopssible, but I was reading that high caffine intake really slows your metabolism down.. so combine that with working from home... you get the idea.

So since it is summer and warm out, I gave up my daily pot of coffee in the morning, and am avoiding all soda beverages. Although.. I think right now it is making me loose my mind
After installation I recieved this error:

"Fatal error: Cannot instantiate non-existent class: html in /home/virtual/site101/fst/var/www/html/test/photopost/pp-inc.php on line 30"

Any idea where's the mistake ?
What is line 30 of your pp-inc.php??


Off hand I would check also first to see if you set the proper path to main.inc.php
Haha... yes indeed... it was the path

Sorry for bothering
Not a bother at all kinda figured it had to be the path at line 30
I have a problem with my integration. For some reason the admin area kinda disappeared. When I look at the source of the page it gives me the frames page and nothing else. I thought that it was an issue with the headers but when I removed the headers from the photopost admin index file it didn't work....

In other circumstances I wouldn't mind but creating a new category by hand is a real pain...

Really baffled :S
Nikos double check the admin files. There are three admin files which are modified. You need to make sure path's to stylesheets etc etc are set. I would look there first. If you can't find the problem contact me privately and we will see whats going on.
Thanks Chuck. I have been meaning to do that (check the files) but never had the time to do it. I will do so though now and if I am not successful I will give you a shout.
Yeah maybe you upgraded to 4.0.1 and forgot to reapply the hacks to the 3 admin files thats my guess if you did upgrade as I assume from your post it originally worked but now isn't.
Yes I didn't change any admin files other than the adm-index.php. I will find the relevant thread and sort it out. Thanks again Chuck.
Awesome hack Omegatron. Thanks for the good work. There is one thing though regarding the table colors. If you take a look at http://www.fish-tails.net/photopost/index.php there's only one table cell with a dark background. Is this correct or do I have something wrong with my stylesheet?
Looks like you forgot to add or set the tdnothumbs class to me. This is set the same as tdheader.

Now personally I like to have MAIN up top for aestetic purposes. When the class is properly set you can see here what it looks like.

http://www.reeftalk.com/ubbthreads/gallery/index.php
I have 4.1 ready for BETA. PhotoPost with TEMPLATES!

http://www.viperalley.com/gallery for a preview.
Cool something for me to play with and integrate.
I'll email you a copy of the BETA1.
WHOO HOO - TEMPLATES!!
Cool thats Great Michael. Should be easy and I can use ReviewPost as a template.
witch version of Photopost ist needed ? normal one or Pro ? The pro version seems a little bit expensive to me. I allready use 'Coppermine' http://www.chezgreg.net/coppermine/

The only thing I miss is a feature to connect Coppermine with UUBt.
Photopost is coded to interact with Threads. I doubt Coppermine has that ability. You might be able to hire a developer to do that but I doubt it would cost you less than buying Photopost. The version you want is Pro.
did someone say templates? WOOHOO!
I think i'll have to get a copy of photopost when 4.1 is ready.
Well the integration will be done before the release.

As soon as Michael sends me the beta and he has released the templated version publically I will release the integration the same time. I had prior experiences with the templated version of Reviewpost so it is rather easy to do Photopost and should cut down the instructions to nothing but modifying 3 files and uploading the new templates.
Thx for your effort, chuck.

But i doubt that i'll integrate it into the forums. All i want is to use the same user-db. I'll integrate it as an module of my site.

The forum is only one part of our site, quite an important one, but only a part. I hope to get my event calendar released in the next week and our webmail client will follow in september.
That sounds cool Astaran
It will be cool when it's finished.
I still need to revamp the template system and make the output XHTML compilant.
works fine. But I encounter a little problem. The slideshow function dosn't work anymore. I dont know this come from hacking or its a bug in the script itself.

I dont use an filter or blocker. Can anyone verify this ? Here on Threadsdev it dosn't work for me and on my 4.01 version it dosn't work too.
Sent it over, Chuck!

The 4.1 BETA should be out shortly - sending it over today.

http://www.danasoft.com/phpppsp2 is the "test site" people can use to try it out and upload stuff.

Threads users will be happy - I used a similiar template setup (no way doing the VB kind with everything in the database and requiring the tiny admin window to edit!); so everyone should be real confortable.
That is a bug I discovered and will update this when I complete the next release very soon. It is real simple adjustment in pp-inc.php give me a few.
fine that you can verify it. You have all the time you need I will do the next big update if I install UBBt 6.3.1 and pp 4.1 with all hacks. Weekendjob
OKay I have the fix Zackary contact me privately and I can explain how to do it until I release the next release.
How does removing the $header code - which removed the refresh meta refresh - fix the slideshow? I wasn't aware there was a problem with it - is this a Threads thing?
You know what Michael that is the weirdest thing. It is more coder error than anything. I don't think its a threads bug or a photopost bug my friend. The main part of how this easy hack works is by bypassing your headers and stylesheets and using Threads variables. Your headers were always blanked out so nothing is sent.

I think the easiest explanation is that the slideshow needs looks to the header to see $headslide ???? which of course usually there. To fix the slideshow I just reversed the hacking on the printfunction for slideshow. The only call in the header that was put back in that I can think would stop it would be that. You would know better.
Except in the cases where the user has selected to turn headers "off" for the slideshow; in which case, you just need to send a simple header with nothing but the refresh meta tag and a title. But I noticed you blanked that out and thats the part that confused me - if headers are "off" and it doesnt print any headers, how does it refresh?
Really all I should need to do in the future is just remove the stylesheet call anyway.

sugestion for a little enhancement:

If we use IIP 5.3.1 it would be nice to have a custom pal box to display a thumbnail of a random picture from the gallerie like 'Picture of the Day'.

[]Zarzal said:
sugestion for a little enhancement:

If we use IIP 5.3.1 it would be nice to have a custom pal box to display a thumbnail of a random picture from the gallerie like 'Picture of the Day'.

[/]

There is a hack for a photo pal box around here someowhere... although I don't know off hand where
I can post it Zarzal.

I have been using one for quite a while. I updated the original one posted by casper along time ago. I posted it in forum design integration for you.

https://www.ubbdev.com/forum/showflat.php?Cat=&Number=89732
Thanks ! I got it, modified to my enviroment and it works. Great.
I use pp4.01, not the new beta. If a user browsing the gallerie UBBt who-is-online show the user state 'administration'.
Zarzal this hack is the one for 4.01 correct. To show the gallery in the who's online add the following to the online.php file in your language directories near the end before the ?>

$ubbt_lang['showgallery'] = "Viewing a Gallery";
$ubbt_lang['addfav'] = "Adding a favorite Picture";
$ubbt_lang['adm-index'] = "Administrating the Galleries";
$ubbt_lang['bulkupload'] = "Uploading a bunch of photos to the Gallery";
$ubbt_lang['showphoto'] = "Viewing a photo in the Gallery";
$ubbt_lang['comments'] = "Commenting on a photo in the Gallery";
$ubbt_lang['slideshow'] = "Veiwing a slide show in the Gallery";
$ubbt_lang['uploadphoto'] = "Uploading a photo to the Gallery";

Thanks again, this looks much better ! Good work
This is a fantastic piece of work -- thanks for this.

The "Help" link doesn't work on the Upload Photo page. I've tried this on a couple sites. Doesn't work on mine, ubbdev.com, or reeftalk.com. (Works at other PhotoPost sites)
Interesting as I have not touched any of the specific code for that but should be an easy track down. I will look into it.

There is also a new release of this hack for the NEW TEMPLATED PHOTOPOST BETA 2
Chuck I found what is wrong with my installation and why I cannot get into the admin area. The modification is identical to your files but I found out that in the pp.inc file you have a check to see the script name adm-index.php or adm-menu.php and if they are not the send_header of the .threads is sent. If they are then it goes on normally to the admin area with its own header. For some reason on my server the SCRIPT_NAME is blank hence it never validates on the if statement.

Is there another way to find out the script name? My register_globals are off. (Windows box)

Thanks
Your the PHP Guru

Being a windows box can you change the register globals or I assume since you have not that your server people will not.

The script simply checks that those two scripts do not include the Threads send_header. If you know of another way than it is coded you got me on that one. Yeah you are right though the header can not be send that is why that arguement is there. A frame needs to be send before a header thus why your admin section does not work.
I haven't played with it at all (and I am not a php guru - yet ). Also I don't want to set the globals on. I will have a look at it and possibly make a couple of changes so that it works similarly to the .threads admin area (with the frames)

Thanks Chuck.


Yeah the reason those are excluded from loading the threads header is the frame needs to load first before the body tag is loaded.
Posted By: so01 How can I make my sidebar to show up with PP - 08/01/2003 10:02 AM
I use sidebars for my threads forum and they are always visible but I can't get them to show up with PhotoPost.
I have applied this hack and it works fine (exept the slideshow).
Can this be done or should I switch over to the "real" sidebar hack?

My mods...

ubbt.inc.php
include("$thispath/templates/$tempstyle/ubbt_registerednav.tmpl");
}
}

// Side Bar code modification
include("$thispath/templates/$tempstyle/sidebar_rightopen.tmpl");

// ------------------------------------------------------
// If the forum is closed then we only let admins proceed
// But they can try to login
if ($What != "login") {
if ($config['isclosed'] && $user['U_Status'] != "Administrator") {
.
.
.
// Sidebar mod code
include("$thispath/templates/$tempstyle/sidebar_rightclose.tmpl");

@include("$thispath/templates/$tempstyle/ubbt_footer.tmpl");
}


// #######################################################################
// Send the footer for admin section
// #######################################################################

Attached File
90535-Sidebar.zip  (7 downloads)
Well 4.1 is almost out but anyway if the sidebar does not work withphotopost then you have it turned off in pp-inc.php?

Remember this part???

// If you use IIP's sidebar you may want to uncomment the line below
// to disable the sidebar on Photopost pages
// $config['iip_call'] = 1;



Okay if you want to make slideshow's work then rehack your pp-inc.php file with the attached



Attached File
90539-photo.txt  (40 downloads)
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/13/2003 10:36 PM
nevermind
LOL

Grabbed the wrong version for your Photopost version JC
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/14/2003 12:15 AM
DOH! Well it seems to run okay.

One question, on the index page, the links :

My Gallery | My Favorites Admin | Home | Profile | Upload Photos | Logout

Should be in a menubar, but aren't. What did I miss? Any ideas?

Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/14/2003 12:38 AM
Got it Lil sugegstion, there is an overuse of the tag menubar, I spent the evening removing it and replacing it with small. You might want to go thru your mod and do the same. Not your fault, photopost got a lil tag happy.

Your talking about the font tags Although my mod has nothing to do with font tags. The only ones I changed where the ones needed for the menubar. There is one thing I could change and that would be the menubar tags in pp-inc.php for the menu they can be small

In version 4 which is for the new 4.1 BETA3 you should try out the templated version.
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/14/2003 3:40 AM
Has a random mod been made to put thumbnails on a non pp page?

It's a client install, rather not play with betas. But thanks for the tip.


You can use this mod I made for IIP You should easily be able to adapt it to a NON PP or Threads page. If not let me know it is easy.

I have attached the custompalbox

Attached File
91881-custombox2pal.txt  (36 downloads)
Post deleted by Mr_CSS
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/14/2003 4:35 AM
Ok all set.. *phew*

Thankie Omegatron!
No Problem. I figured the MYSQL code and such in their would give ya the proper hints
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/14/2003 9:08 PM
Yup, all fixed. Spent a long time with the layout cleaning it up etc.. One thing, I did have to alter some of the code added to showgallery.php. The last bit I left as it was, otherwise it caused the copyright area to show within a table...weird...

Otherwise it's fine

Live site
well thats wrote for an IIP Pal. I am sure you had to alter it a bit
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/15/2003 5:32 AM
Actually I meant the PP hack.
Posted By: so01 Re: How can I make my sidebar to show up with PP - 08/15/2003 9:27 AM
But I don't use the IIP sidebars. I just include two templates for a regular sidebar.
Will this automaticly work with 4.1?

/Stefan
www.steffo.nu
Clean away JC but your cleaning Photopost not the hack

This hack is actually a few lines in pp-inc.php. Every other file is basically removing tables and placing $tbopen and $tbclose variables for tablewrapper sites. So you really lost me when you said cleaning up coding? I am removing 4 lines of code and placing a threads variable HMM. Can't get much cleaner.
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/15/2003 7:13 PM
Yup cleaning PP, not your code.
JC,

You would spend all day doing that

God I think the first Integration I did I went through every file in Photopost and made it XHTML compliant.

There are still things in there like stray font tags and <p> tags without a closing or the <p /> proper tag.
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/15/2003 10:57 PM
Yup.. I wanted it to match as best it could to the rest of the site for my client.
Ok had it working earlier.... but now getting this-

Warning: Cannot add header information - headers already sent by (output started at /home/nas02/a/audi-sport.net/user/htdocs/ubbthreads/templates/default/ubbt_header.tmpl:19) in /home/nas02/a/audi-sport.net/user/htdocs/photopost/login.php on line 40

Warning: Cannot add header information - headers already sent by (output started at /home/nas02/a/audi-sport.net/user/htdocs/ubbthreads/templates/default/ubbt_header.tmpl:19) in /home/nas02/a/audi-sport.net/user/htdocs/photopost/login.php on line 42

Warning: Cannot add header information - headers already sent by (output started at /home/nas02/a/audi-sport.net/user/htdocs/ubbthreads/templates/default/ubbt_header.tmpl:19) in /home/nas02/a/audi-sport.net/user/htdocs/photopost/login.php on line 48

didn't need to log on before, now it asks me to, any ideas?
Posted By: J.C. Re: How can I make my sidebar to show up with PP - 08/26/2003 1:28 AM
my bad, didn't read properly
I just looked at your site. You have not completed the integration. You need to do all the class additions to your stylesheets.

I never login through Photopost. I login through Threads and if cookies are set to / then Photopost reads it.

As far as login information did you happen to put a forum prefix in the config. If so this will cause problems. If your forum database prefix is the standard w3t_ you do not need to specify anything. Check in your Photopost database under settings #83 and make sure the forum prefix is empty if you use the default.

Login works fine on many sites and what little code you enter from this mod only affects stylesheets. The Header warning is a PHP warning setting.

I would look to your inability to login on the Photopost site as there are many many threads about login's not working between most every supported board. You can also contact me privately and I will help you figure it out. It is no doubt simple fix or setting.
Does this mod work with Photopost 4.1? I just purchased and installed it, but I can't find the lines mentioned in Comments.php. In fact, there doesn't appear to be any HTML at all in comments.php. Is there somewhere else I need to look?

Thanks
You need Version 4 get it here

https://www.ubbdev.com/forum/showflat...5/o/all/fpart/1
© UBB.Developers