UBB.Dev
Posted By: omegatron Threads Wrappers for Photopost - 01/24/2003 12:33 AM
Okay what this does is expand upon the work of JustDave and Dalantech and make Photpost use the table wrappers for a more uniform Threads site.

You can attempt this if you own Photopost as well as Threads and want them to look the same. This is compatable with Threads 6.2,6.2.1 and Photopost 3.2.1.

You can see a demo here:

http://www.reeftalk.com/ubbthreads/gallery/index.php



Attached File
Posted By: shortbus Re: Threads Wrappers for Photopost - 01/24/2003 2:10 AM
You Da Man!
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/24/2003 2:47 AM
I took the time to write it up just for you
Posted By: JoshPet Re: Threads Wrappers for Photopost - 01/24/2003 6:09 AM
Nice.
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/24/2003 6:14 AM
Now this is superficial now. If you see what I have done you basically need to do that to every Photopost file that has a table. I also took out the hard-coding of colors and replaced with CSS class variables so that when I change theme's color's change something Photopost does not do.

I will post more on that subject.
Posted By: dimopoulos Re: Threads Wrappers for Photopost - 01/24/2003 11:15 AM
Well done Chuck. This is awesome!!!!

Warm regards

Nikos
Posted By: Dalantech Re: Threads Wrappers for Photopost - 01/24/2003 12:25 PM
Excellent work!
Posted By: shortbus Re: Threads Wrappers for Photopost - 01/24/2003 12:48 PM
Thanks man! You're making me blush!
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/24/2003 1:31 PM
Come on buddy how many of us have both Threads and Photopost,

Hmm let me see the usability of this hack is minor. I know of maybe 5 of us.

JoshPet,Myself,Msula,You and casper. I know there are a few others.



Posted By: Dalantech Re: Threads Wrappers for Photopost - 01/24/2003 7:17 PM
I can't find JustDave's CSS Table Wrappers mod (even tried to search for it). Anyone got a link?
Posted By: Mudpuppy Re: Threads Wrappers for Photopost - 01/24/2003 9:06 PM
[]Come on buddy how many of us have both Threads and Photopost[/]

I use them both, too. I'm in the process of attempting this hack (I'm still on the Threads Table Wrappers Mod step), although all the "if you dare!" statements in your instructions leave me feeling a bit intimidated. I love anything that makes my site look more cohesive, and appreciate the work folks put into hacks like these. Thanks!
Posted By: Mudpuppy Re: Threads Wrappers for Photopost - 01/24/2003 9:07 PM
[]I can't find JustDave's CSS Table Wrappers mod (even tried to search for it). Anyone got a link? [/]

https://ubbdev.com/threads/php/...ew=collapsed&sb=5&o=&fpart=1
Posted By: Dalantech Re: Threads Wrappers for Photopost - 01/24/2003 9:44 PM
Thanks!
Posted By: msula Re: Threads Wrappers for Photopost - 01/24/2003 11:00 PM
omega rules I haven't implimented the table wrapper mods yet as I haven't had time for any redesigning, but this will be of great benefit for making a seamless transition

Thanks.
Posted By: msula Re: Threads Wrappers for Photopost - 01/24/2003 11:03 PM
Actually, I just thought of something...

how does this handle multiple stylesheets? I know photopost has the forum colors, links, text, etc all specified within the database. It doesn't use CSS yet.

So, I'm assuming this hack will only work with the colors you specify inside photopost correct? For example right now I have 4 color schemes people can use, but photopost is stuck using only one Just wonder if this is something your mod changes, or we have to wait until PP begins using templates and CSS
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/24/2003 11:10 PM
You are correct Photopost will use CSS and templates next version. My hack only does one style. However I am writing up a small chart for those that dare to convert CSS in Photopost. The changes are too intensive to list an exact hack but this is not that hard. I have done this on my site to all the major files so that people can change stylesheets and Photopost changes. It is a simple but time consuming thing but anyone can do it. Example below:

bgcolor="{$Globals['bordercolor']}"

would be

class="tableborders"

or

bgcolor="{$Globals['maincolor']}"

would be

class="darktable"

or

bgcolor="{$Globals['headcolor']}"

would be

class="tdheader"

Like I said I am going to write up a short comparison so those that want to do this can do this and this should provide full integration until Photopost catch's up with the CSS and template thing.

I got ya covered Msula I know a die hard Photopost guy like you wants the whole thing. Let these guys digest the first part and they can finish for multiple stylesheets next. I will have a comparison probally tonight or tommorow morning.
Posted By: Dalantech Re: Threads Wrappers for Photopost - 01/24/2003 11:15 PM
When you installed JustDave's CSS table wrapper mod did you declare the background images in the tbopen and tbclose files that you made, or did you use CSS classes?

The reason why I'm asking is that after reading the mod it makes more sense to put the path for the background images in the tbopen and tbclose templates that you make for each style sheet.
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/24/2003 11:29 PM
Dalantech,

Dave's mod changes nothing from your mod. All his does is make threads aware whether there is a wrapper or not.

Currently in your mod tbopen and tbclose has the 10pixel spacers which show up in every stylesheet whether you have a stylesheet graphic specified or not. So if I did not use wrappers for greenday in your mod I would have a 10pixel border around my tables. With his mod installed I would not. You simply put a clean copy or tbopen and tbclose in your template directory. For every stylesheet where you define the CSS classes with images you would create a tbopen-(stylesheet name).tmpl and tbclose-(stylesheet name)/tmpl with your mods. You see the difference? This allows use of multiple stylesheet use without displaying that empty table and making your site look a little funky.
I called the images from CSS classes just like you did. I just name the templates ending name the stylesheet name.
I have only made stylesheets for my default stylesheet and greenday so if you choose infopop you will see the normal tables.

Your mods go together like peanut butter and jelly.
Posted By: Dalantech Re: Threads Wrappers for Photopost - 01/25/2003 12:14 AM
Thanks for the info

I was thinking that I could create a "painless" set of table wrappers (easy to install).

I should have the new set up soon. Take a look at my site for a peek at what the new graphics / templates can do
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/25/2003 12:38 AM
I would say your mod is quite easy to install. How hard is it to copy 8 graphics to a directory. Add eight CSS classes to a stylesheet and edit the path to the graphic. Then make a few small changes to two templates.

I must be sleeping as I looked at your site and am missing something.
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/25/2003 1:02 AM
If you also want to make Photopost use Threads CSS classes you can edit the global color calls in all the following files in Photopost to make about a 95% integration feel and look.

showphoto.php
showgallery.php
pp-inc.php
index.php
comments.php
reportphoto.php

Now this does not change the admin area or anything behind the scenes but this should be most of the files needed to get the look you want with multiple stylesheets. You can see a demo here

http://www.reeftalk.com/ubbthreads/gallery/index.php

username:test
password:test

You can change stylesheets and see what I mean

Get the attachement for the class changes.

Attached File
66092-PhotopostCSSclasses.txt  (283 downloads)
Posted By: JoshPet Re: Threads Wrappers for Photopost - 01/25/2003 6:33 AM
Omegatron.. I'm proud of you for pulling all this together. Good work.
Posted By: shortbus Re: Threads Wrappers for Photopost - 01/25/2003 9:18 AM
Hey man, that text on your site is pretty hard on the eyes. Just wanted to let you know my experience in case it helps you to make it better. I couldn't look at it for too long. I think it is the pink on the purple that does it. Anyway, just wanted to let you know.
Posted By: Dalantech Re: Threads Wrappers for Photopost - 01/25/2003 9:19 AM
LOL! No, it is that easy. I was just trying to find a painless way for people to change between multiple styles. I plan on releasing a few sets
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/25/2003 2:52 PM
[]Hey man, that text on your site is pretty hard on the eyes. Just wanted to let you know my experience in case it helps you to make it better. I couldn't look at it for too long. I think it is the pink on the purple that does it. Anyway, just wanted to let you know. [/]

I hope your not talking to me? My site is not pink on purple so I am lost here.
Posted By: fishtails Re: Threads Wrappers for Photopost - 01/29/2003 3:26 AM
I'm using photopost at my fish-tails.net site, but I haven't upgraded that one to 6.2.1 and the latest photopost. Hopefully I can get around to it in the next week or so. Did anyone experience any problems with compatibility between the latest threads (new user system) and photopost?
Posted By: Mudpuppy Re: Threads Wrappers for Photopost - 01/29/2003 3:31 AM
[]Did anyone experience any problems with compatibility between the latest threads (new user system) and photopost?[/]

The only problem I found was that Photopost wanted me to login to the admin account with my UBBT display name, as opposed to my username. Once I figured out that little trick, everything worked fine.
Posted By: JoshPet Re: Threads Wrappers for Photopost - 01/29/2003 3:39 AM
Fish -
You also need to hack photopost a bit or else the links to profiles don't work. (It tries to look them up by username... the new threads needs user number).
Posted By: fishtails Re: Threads Wrappers for Photopost - 01/29/2003 3:54 AM
Ok, thanks. Do you have a list of the files that require hacking posted somewhere? If not, I'll just get out my trusty notepad.
Posted By: JoshPet Re: Threads Wrappers for Photopost - 01/29/2003 4:13 AM
I've done some more major tweaking there.... but this shoudl be all you need to do to fix the usernumber thing:

Code
<br />pp-inc.php<br /><br />Find this:<br /><br />            $profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&amp;user=$tusername";<br /><br /><br />Change to this:<br /><br />            $profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&amp;User=$tuserid";<br />							<br />


Simple.
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/29/2003 4:17 AM
No major errors here other than having to fix the profile thing as Josh posted above.
Posted By: Liahona_dup1 Re: Threads Wrappers for Photopost - 01/30/2003 5:09 AM
Hi Chuck

Great hack.

Rather brain burning for me, but eventually got it going only probs I had were human error.

Thanks.
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/30/2003 1:09 PM
I warn people do I not.

The Photopost hacking actually we could do without all the extra's. If you applied this hack without the tablewrappers you would still have a super integrated Photopost without table wrappers.

I should have just called it SUPER INTEGRATION HACK LOL

But then again having the table wrappers is what forced me to do this.
Posted By: Liahona_dup1 Re: Threads Wrappers for Photopost - 01/30/2003 2:52 PM
Hi Chuck

It's brillllllll

The Photopost page looks like it's part of threads now, and also with the sidebar-pals from Josh it looks like part of Dave's IIP, and not forgetting Dalantech's wrappers, so all in all it's worked out great.

Now I will need to look at the colours in photopost.....

Thanks
George
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/30/2003 11:32 PM
In this thread there is a attachment I posted on what variables and files to change photopost entirely on the front end to CSS.
Posted By: AllenAyres Re: Threads Wrappers for Photopost - 01/31/2003 9:12 AM
has anyone seen problems with this and mozilla/opera? Something like a LOT of gibberish (binary code looking stuff) right below where the threads header gets called? It looks fine in IE6 and validates at w3, but for some reason doen't work at all in mozilla. smirk
Posted By: AllenAyres Re: Threads Wrappers for Photopost - 01/31/2003 9:31 AM
right where the first $tbopen is being called I get a LOT of this:

<br />‹_¼³a,¥"ñºÝnIŸ]w‹°áÒ›Ìå·pô7ŸÞÀ°`|≗²ÇŽ%6' òwS5fÖÓò–Ç¢g5½FÚî²RÛªÔò<*eå4ëœ
c)TÊw\&©ä&¾óɱ
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/31/2003 1:13 PM
Let me fire up my copy of Mozilla and see what I can find. Might have to wipe the dust off.

I tested everything in IE and Netscape.
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/31/2003 1:34 PM
Allen,

I just ran Mozilla 1.2.1 and no problems. Now suffice it to say nothing in life is perfect.

Maybe there are some characters that made there way in there?
That would be my first guess or an upgrade to a newer Mozilla if its an older copy.

Try browsing my Photopost index and see if you see the same error. This will tell you whether its your version of Mozilla or not (If your not runnung 1.2.1) since I am posting to you and viewing that page with the new Mozilla. Would life not be simple if things were as easy as an upgrade.

Photopost Index
Posted By: AllenAyres Re: Threads Wrappers for Photopost - 01/31/2003 10:05 PM
I can view your site fine... the only thing I did differently was skip the header mod, as I still don't see how it's needed with the way this mod pulls in the threads header already in pp_inc.php. Maybe it's the server this is being run on...
Posted By: omegatron Re: Threads Wrappers for Photopost - 01/31/2003 11:04 PM
This mod pulls in the Threads header as it does in pp-inc.php however it pulls a header that uses the $tbopen and $tbclose variables. If you pull the header from pp-inc.php it does not include the new templates.

Yeah I think your right it might be there server. If you want to post the site url I can see if I view the same thing or if you do not want to post that url you can always PM me. I would be more than happy to help try and solve the problem.
Posted By: AllenAyres Re: Threads Wrappers for Photopost - 01/31/2003 11:31 PM
thanks, I'll need to re-add it and pm you... will do so this weekend when the site isn't so busy

I edited the files as described in the instructions in this thread, which edits pp_inc.php so that it pulls in the tbopen and tbclose subs from threads. I actually meant I didn't do dalantech's generic header mod as requested in the first thread as it doesn't seem to have anything to do with this mod
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/01/2003 12:07 AM
Dalantech's mod enables your header to use the tbopen and tbclose templates. As it stands now the header is separate from the new tbopen and tbclose variables. It does not make that big of a deal if you do not use table wrappers but if you do the header will not have them unless you install the generic header mod.
Posted By: fishtails Re: Threads Wrappers for Photopost - 02/01/2003 4:29 AM
Thanks Josh, you're tops.
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/01/2003 5:06 AM
Josh?
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/01/2003 5:06 AM
Josh?
Posted By: JoshPet Re: Threads Wrappers for Photopost - 02/01/2003 7:17 AM
LOL - I had to click the "Re: JoshPet" to see what he was replying to. I'd forgotten and couldn't figure out how I'd earned any credit here.

But he was replying to my instructions to fix the user number in the profile of photopost thing.

Kudos to this mod goes to omegatron.
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/01/2003 5:43 PM
LOL sometimes showflat has its disadvantages.

I forgot you even replyed to anything in this mod.
Posted By: dimopoulos Re: Threads Wrappers for Photopost - 02/01/2003 7:00 PM
This then is the proof for those that thought that the Re: is not necessary for threads this size.

Nikos
Posted By: dimopoulos Re: Threads Wrappers for Photopost - 02/01/2003 7:16 PM
A note to everyone:

If you are planning to install this modification, please first check if you have included the following:
Code
<br />// UBBThreads Headers<br />// Set $PathToThreads to the path of your threads installation (INCLUDE TRAILING SLASH /)<br />// or leave blank if this page is located the threads directory<br />// Provided by JustDave from https://ubbdev.com<br /><br />   $PathToThreads = "C:/www/htdocs/development/forum/";<br />   require ("{$PathToThreads}main.inc.php");<br />   $userob = new user;<br />   $html = new html;<br />   if ($title == "") {$title = $config['title'];}<br />   $html -> send_header($title,$Cat,0,$user);<br />

in your header-inc.php then using the instructions of this mod you need to comment this line:
Code
<br />require ("c:/www/htdocs/development/forum/main.inc.php");<br />

as per the instructions for the pp-inc.php.

If you don't then the Sql class will be redeclared, hence throwing up an error on the screen.

Nikos
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/01/2003 7:42 PM
Nikos,

Actually this hack is written for Photopost 3.2 and Ubbthreads 6.2. It is even specified as such.

You can adapt it for prior versions and and just simply remove the header include. So instead of trying to comment out the main-inc.php file just do not use the header-inc.php file. In fact is you look close at the header-inc.php with Photopost 3.2 it only supports vbportal and vbulletin boards.

This hack works just fine the way it stands since Photpost 3.2 does not use the header include for Threads any longer. That was thrown out when Michael wrote 3.2 since it was causing so many problems.
Posted By: dimopoulos Re: Threads Wrappers for Photopost - 02/01/2003 7:54 PM
Well I got both of them... or at least I think I have PP 3.2... That version is the one that uses EXIF information correct?

I guess that my upgrade kept the header file

Nikos
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/01/2003 8:01 PM
I think you have 3.1 which also uses the exif info.

3.2 does not support ubbthreads through the header-inc.php file. The code in that file was deleted by Michael Pierce. It only support the two boards mentioned above. If one wanted to add head tags in Photopost 3.2 they would have to create a separate html file and link it in the admin section. I know until I did this hack I had to do this in 3.2. I use to always use the header-inc till 3.2 to load my CSS file for the background image as bgcolor tags for body is no longer XHTML compliant.

I have updated the attachment on the first post to include Beyond Compare difference reports in html so to try and make it easier. My files have all the CSS changes needed for integration.
Posted By: dimopoulos Re: Threads Wrappers for Photopost - 02/01/2003 8:40 PM
Chuck,

I do have 3.2.1 - just checked it... But I re-read the instructions you posted and found this:

One more thing make sure you clear any header or head tag calls you have in the Photopost
admin section as you will be using Threads headers and such.

Don't I feel like an idiot now...

Nikos
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/01/2003 9:41 PM
LOL No biggy

The one thing for sure I kept thinking you had an earlier version is you kept on saying header-inc.php. That file like I said no longer has any threads support. 3.2.1 is what I have as well. I just posted beyond compare difference reports in the zip if you have not made all the CSS changes yet. I also added reports for 2 more files that are used on the front viewable end of this program as well.

Posted By: dimopoulos Re: Threads Wrappers for Photopost - 02/03/2003 2:34 AM
Thanks! Those reports helped a lot!

Nikos
Posted By: smilesforu Re: Threads Wrappers for Photopost - 02/07/2003 11:42 AM
I don't have the full hack running.. Josh I tried [] pp-inc.phpFind this: $profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&user=$tusername";

Change to this: $profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&User=$tuserid"; [/]

hmmmm probably needs the database update too? But when I asked it to find my profile it said I didn't exist in database

oh ya
http://www.steelheader.net/photopost/index.php is the photopost url so you can see what I mean.
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/07/2003 2:01 PM
Okay at line 1067 find this code:

if ( $Globals['vbversion'] == "w3t6" ) {
$profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&User=$tusername&Number=$tuserid";
$postreply = "<font color="{$Globals['headfontcolor']}" face="{$Globals['mainfonts']}" size="{$Globals['fontmedium']}"><b>Post a Reply</b></font>";
}
else {
$profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&user=$tusername";


REPLACE WITH:

if ( $Globals['vbversion'] == "w3t6" ) {
$profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&User=$tuserid";
$postreply = "<font color="{$Globals['headfontcolor']}" face="{$Globals['mainfonts']}" size="{$Globals['fontmedium']}"><b>Post a Reply</b></font>";
}
else {
$profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&user=$tuserid";

I visited your site and that function is still set to read username.
Posted By: smilesforu Re: Threads Wrappers for Photopost - 02/08/2003 2:40 PM
Thanks Omega worked like a charm.... At this rate I am going to run out of projects for you guys
Posted By: JoshPet Re: Threads Wrappers for Photopost - 02/10/2003 6:40 AM
From the requirements:
[]* 3) Apply Dalantech's Header Mod ( so that it uses the table wrappers ) *
[/]

Which mod is this?
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/10/2003 6:43 AM
It is this one Josh.

https://ubbdev.com/threads/php/...ew=collapsed&sb=5&o=&fpart=1

Basically it puts the header into a template so it uses tbopen and tbclose.
Posted By: Dalantech Re: Threads Wrappers for Photopost - 02/10/2003 7:35 AM
I almost replied before you (was coming back here with the hyperlink ).
Posted By: JoshPet Re: Threads Wrappers for Photopost - 02/10/2003 8:27 AM
Thanks.
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/10/2003 1:02 PM
I am glad you got this working for Leigh Ann Josh however minor server issues?

Alot more than that it seems. She let me know I forgot to include upload page in the instructions. I will update them as I have them done.
Posted By: JoshPet Re: Threads Wrappers for Photopost - 02/11/2003 10:30 AM
[]I am glad you got this working for Leigh Ann Josh however minor server issues? [/]

I never did truly get it to work. I finally gave up and cheated.

I added the code for tbopen and tbclose into the pp-inc.php file and made them global variables (like {$Globals['tbopen']}) and then used the local global variables throughout.

So I am using the tablewrappers without using the threads send header command or requiring main.inc.php as that seemed to freak it out.

Then I tweaked the photopost authentication to fetch the user's stylesheet (or default to the board's default) and then call the threads stylesheet.

It ain't pretty. But it works!

She wasn't planning on changnig the tbopen,tbclose templates too often. If so, the code would also need to be edited in the pp-inc.php file. But the stylesheets are still called from threads.
Posted By: omegatron Re: Threads Wrappers for Photopost - 02/11/2003 1:28 PM
Thats a major server issue. LOL You got it as hard coded as you can get. I think we both agree she should be able to call threads in another program if main.inc.php is called. Still scratching my head on that one?

I would be intrested in the code you used to make it pull the board stylesheet. Photopost 3.3 actually uses CSS sheets and there are only about 6 classes existing users of Threads need to add to their stylesheets. I think being able to set it to the boards stylesheet is the best way.
© UBB.Developers