UBB.Dev
Posted By: omegatron UBBThreads/Photopost Integration Version 2 - 04/13/2003 4:46 AM
Requirements are Ubbthreads 6.2 and above and Photopost 3.3 and 3.3.1

This is a modification to allow full design integration between these two wondeful products.

There are several changes so I decided to include Beyond Compare differences reports to make it easy.

There are two steps. Apply all changes in the differences reports to the files and then add the CSS additions to all your stylesheets matching the colors with what is stated.

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

Attached File
cool, thanks for the update
A little bit easier as stylesheets are used in Photopost now. I did not need to replace every global call. Plus Michael used Threads stylesheets as a basis to work from so you only need to add about 6-7 new classes to every stylesheet.
[]omegatron said:
Plus Michael used Threads stylesheets as a basis to work from so you only need to add about 6-7 new classes to every stylesheet. [/]

thumbsup
try 'waytogo'

Posted By: msula Re: UBBThreads/Photopost Integration Version 2 - 04/13/2003 4:27 PM
It is very beneficial that Michael is a threads user
Dont think "they" havent tried to convert me (the VB crowd makes up a very large part of PP's customer base!)

But I'm a dyehard Threads fan, so......

Giving props, though; VB does have alot of the "little" things I would love to see in Threads: Ignore User, Detailed Signup Page, PHP tags, EDIT Thread which lets you pick which posts to delete or keep all in one page (and delete means delete, not replace with holder!) and is about $70 cheaper, among other things.
Yes very much so. There are alot of benefits for us that he is so. Alot easier this time as I did not have to go change all the hardcoded GLOBAL COLOR CALLS. Though you do need to add those CSS classes to every stylesheet you use.

Yes Michael us diehard Threads fans I actually own both products yet have never used VB in a production forum. Only test forums. There are features I would like to have for Threads but no matter what features VB has I have never switched from using Threads.
Michael Rocks!

Thanks for the props guys; knowing you guys work as hard as I do makes that even nicer!

I'm hoping we can spur an even bigger Threads involvement (i.e. need to get more Threads users using the product!); if only InfoPop would return our calls! lol
he he

The integration has gotten alot better between the 2, really. It's been great.

It's come a long way since you hacked/integrated my first copy for me.

We now have 16,000 photos. We'd have had more, but I lost a few thousand in a hard drive crash last month.

I like the new version of Photopost for the reason stated before. The first integration involved changing every global color call YUCK!! So much easier. I can't wait till Michael does the templating of HTML for Photopost. I do not know if this is still on target for his original 3.4 version. I do not beleive it is but whichever version it will be a great addition for customization issues.
I've decided to hold off a little bit on templates; we're getting alot of flack from our users over stylesheets and I've had to focus on making a GUI for that (and making it easier).

3.4 has alot of rewritten code (as well as improved Threads integration), mostly behind the scenes stuff that will make hacking easier. I'm not planning alot of new features; not yet anyways.
Well the hacking as you can see with this one is pretty simple as over half the changes are only XHTML compliance issues with some font tags left over when you coded it.

The only hacking to get it to do the integration I did if you saw was to include main.inc.php and call the tablewrappers and replace tablecalls with the $tbopen $tbclose variables. This was to allow people who use tablewrappers like myself and others to make use this feature. I also replaced your stylesheet call with the Threads fstyle variable. There is about 6-7 new CSS classes to add to every Threads stylesheet. Pretty simple a hack only took me the time to sit down and do it. If you plan on making it easier than that YOU DA MAN. Pretty simple now but I will welcome easier any day of the week. With each new version you make my job easier.

Oh well I guess I will have to wait for templates. If you need any help let me know. That is more my area anyway as I am more a hacker than a coder. I think I can safely say that everybody here at ThreadsDev appreciates your devotion to Threads and your tireless work at making Photopost the best Gallery software out there.
Definately.
Posted By: msula Re: UBBThreads/Photopost Integration Version 2 - 04/14/2003 6:20 AM
Templates can wait a bit, since at least with CSS it is 1000x easier to get the two pieces of software to look alike, even if not quite as easy as a full template system

Thanks for all of the hard work Michael
I know this may not be the place, (please forgive me) but I was wondering if any thought was taken for moving photos from one member to another? Case in point: Before I purchased PhotoPost, I used another image gallery which did not use a member function, and many pics were sent to me via snail mail for me to scan up. So, when I started using photopost, I did an upload from my database. All went well, except all the photos are showing as contributed by me, when in fact they were submitted by my users. I would like to move them from my album and assign them to the appropriate member/owner. Has anyone done a hack for this, or Michael have you thought of implementing this functionality? I still get photos sent to me for scanning because they don't own a scanner or digital camera, but they do have a pc to visit the web site. (It's a fishing site, with a lot of anglers who just want to fish and are computer illiterate. ) If not, could you tell me how I can do this thru mysql?
The only way right now to do this that I know of is to go into the database and edit the photo's via PHPMyAdmin and change the usernumber and username.
You'd also have to change the name of the file since the userid is included in the filename....
Good point did not catch that one.
Posted By: JoshPet Re: UBBThreads/Photopost Integration Version 2 - 04/14/2003 11:15 PM
Yeah....

I had a hacked integrated version way back.... and the usernumber shift when threads increased everyone's user number by one, really screwed me (and thousands of photos).

They would display with the wrong username.
My ultimate solution was to look up the username from the threads database, and hack a solution so if the pic was before my upgrade date, to subtract a number from the usernumber.

Sort of gets me by, at least the photos display the right username, but photos pre my disasterous upgrade aren't really searchable by username etc...

LOL
All that was to say, there isn't an easy way to change the user number of a photo because of the way they are named.
Yes as pointed out there are 3 steps involved. Change the username userid and file name to the proper usernumber file name. Pain and alot of work. Not bad if you have a few photo's but when you have alot oh boy.

I am not even going to relive my horrors. I have gone through 3 major Photo Galleries and only one had a real good import script. That is something Photopost lacks. Most of my photo's bear my name since when I upgraded to Photopost I uploaded them from the old program.
I was working on an import script for Gallery; but got distracted. Also had an import scipt for ImageFolio going, but that got put on hold as well.

Might be a good time to go back and look at those again.
Ouch. Sounds like I have my work cut out for me. I guess I'll do that after I get everything upgraded to the latest release of threads and PP. I've been trying to upgrade for a month now and still haven't had time to do it yet.
Chuck,

A couple or minor issues:

Line 45:
Code
<br />$stylesheet = "/usr/local/apache/htdocs/ubbthreads/stylesheets/$fstyle.css";<br />

can be changed to
Code
<br />$stylesheet= "{$config['stylepath']}/$fstyle.css";<br />

and line 1510
Code
<br /><link rel=\"stylesheet\" href=\"/usr/local/apache/htdocs/ubbthreads/stylesheets/$fstyle.css\" type=\"text/css\" /><br />

can be changed to
Code
<br /><link rel=\"stylesheet\" href=\"{$config['stylepath']}/$fstyle.css\" type=\"text/css\" /><br />

Also you can pass a text string in the $html -> send_header("My Site's photo gallery", $Cat, 0, $user); to make it a bit more consistent with your site.
LOL Yeah Nikos Thanks. I forgot when I did a file compare to edit for the hard coded variable additions. I updated the first post.
Is there a trick to using diff files.

I've never gotten them to work and usually end up rewriting the mod.

Am I missing a way that makes them easy to understand?

I never can copy and paste lines as I get weird HTML characters.
Yeah I was completely lost when Dave Lozier released the calendar mod like that. I had no problem if I pulled up the html files copying and pasting lines with extra characters.

In any rate the mod itself is only the tbopen and tbclose variables as well as the tablewrapper call and main.inc.php call. Everything else is simply XHTML changes since Photopost seems to be carrying problems around like alot of double font close tags and font tags without close etc etc.
If you really think it is super hard using the diff reports I could write it up the old way. Saved alot of time though using beyong compare reports. Especially since most people use it.
I was able to figure it out.... I just wondered if because I use the mac and don't have "beyond compar" if I was missing out on a super-easy automatic way to use them.

It did make more sense as I figured out that the one column was the new line numbers.

But everyone else pretty much just looks at them and makes the changes from there?

Would be cool to feed them to beyond compare and poof the changes would be made.
Yes it would. Ah so thats why you had such a problem. Your a MAC dude and don't get to use beyond compare.
So if I download and install beyond compare on my PC.... does it read those diff files and do it automatically?
It will read any files (even pictures) and it will tell you where the differences lie. With a simple right mouse click you can copy line(s) from one file to another. BC cuts upgrade times a lot
Yes, I know that. My BBEdit does that on the mac. Thats what I use to upgrade.

But can I feed it omegatron's diff files and let it make those changes?
I find the diff files tough to read and you can't copy and past from them easily.

I wondered if I was doing it the hard way.
Nothing is automatic. Beyond Compare difference files make it alot easier as line numbers are marked and a few clicks and your done. I remember when I was using UBB classic there was some program that did that however I never liked that and usually went back to manually coding things.

Still with the difference report without beyond compare it should be a bit better than a normal typed up hack as all line numbers are included. Simply pull up the html in your browser and edit the lines stated with an editor that displays line numbers. I never did get used to using MAC'S so I do not know what bbedit is.
I've never used BC diff reports, I'll try it out
Dave Lozier threw me for a loop when he used them for the calendar mod but I saw how easy it was when I got the hang of it.
BBEdit is just like beyond compare. Text Editor for programming and it compares files and folders. Shows you the differences and you can click to copy one side to the other.

My problem with the diff reports is that once I added the new lines or made edits. None of the line numbers matched up anymore.... so it became difficult to find where I was supposed to change next.

Then it was difficult to copy and paste. I think the strike through created special characters between each word when I copied and pasted, then it was broken between multiple lines.

Maybe I need to look around. If there were an option to also show me the original line numbers in BBEdit, then it would probably be doable. But otherwise as soon as you edit, the line numbers were all off. After a handfull of edits, and without the ability to copy and paste, I was hard pressed to find where I needed to be. So I ended up re-creating the mod from scratch.

But I got it to work.
Just wondered if I was taking the difficult route, or if the diff reports were as good as they got.

If beyond compare would create the standard text file that you can copy and paste from which said "find this:", "replace with this:" that would be best.

Maybe I should try next time on the PC and see if it lets me copy and paste from diff reports.
Okay I got ya the orginals come with BC but there are about 5 different reports one can do with or without line numbers etc. Maybe someone with more experiece can say what are the best reports to use.
I'll download beyond compare and play as well. I'm sure I'm missing the obvious on this end. LOL
I have to go back to MAC SCHOOL. It probally has been a good 10 years since I even played on a MAC. I am lost completely when one starts talking about them.
Well if you know windows, you can handle a mac.

The new OS is bascially Unix. Very different from the old Mac OS.
Ah cool I remember the old MAC Yuck. Not anything wrong with a MAC I just remember them being somewhat limited from a PC. I know they are still somewhat the same even though they have a more robust OS. I am talking hardware etc. Very limited.
I have integrated this modification on my main site and it works like a dream.

However while trying to integrate it on another site I get the attached image. Both sites run the same versions of UBBT and PhotoPost and also Beyond Compare reports that all files are identical.

Any ideas anyone?

Thanks

Attached picture 79050-problem.jpg
Nikos....

Allen and I ran into that on the IyariLimon.com site.

None of us could figure out why it freaked out at the first table wrapper.

I worked around it a bit.

Instead of being able to call the table wrappers from threads.... $tbopen

I had to create a Global variable in pp-inc.php containing the HTML for the table wrappers and use those PhotoPost global variables instead of the tbopen tbclose calls.

Wish I knew the real answer. But that's how I worked around it.
This has got to be a setting in the PHP variables that needs to set differently. You could do as Josh instructed and create a global call in pp-inc.php.

If you have access to changing the php.ini compare your php info on both sites and try changing one at a time some of the major ones commonly used that are different. I remember Josh's issue under the first version. Photopost seems to choke on the tablewrapper indeed which is weird since it is only a variable dictating a simple html string.
I'll give it a go Josh. Thanks a bunch.

Twice you save my butt today
Hi Chuck,

No I don't have access to the php.ini file. I did create two variables:

// 20030423 - UBBT Integration - New Start
$Globals['tbopen'] = $tbopen;
$Globals['tbclose'] = $tbclose;
// 20030423 - UBBT Integration - New End

which I use instead of $tbopen and $tbclose respectively. Unfortunately it doesn't work.

I think I must do a fresh installation and see how it goes...
Nikos.....

I actually had to not call the table wrappers at all.

So do this:

$Globals['tbopen'] = "<table blah blah blah ><tr><td>....";

Copy and paste from the templates.

Put the actualy HTML in the pp-inc.php

Thus I realize that if I wanna change the wrappers... I'd have to change both the templates in threads and the pp-inc.php file. But it was the only way I can get it to work.
Yeah Nikos I remember Josh well he hardcoded something but it was only like one section. The tbopen and tbclose would only not work for pp-inc.php but worked on every other file?

Josh that is how I recall it right? The easiest way is would simply be to try replacing the tbopen and tbclose with the proper html in pp-inc.php ONLY and seeing if this solves the problem.

I would do it step by step and see if we can figure this out out. This now makes two sites that have a problem parsing the tbopoen and tbclose variables.
I tried that as well guys. Still junk on the screen. I will try a fresh installation today to see how it goes.
On that same site.... I think I was also never able to use the threads send_header function.

I might have needed to add a query to the photopost login-inc script to figure out the stylesheet.

Still... there's got to be a reason why it doesn't work.
Yeah from other threads I see you have problems with various mods and things. Example the sidebar. I wish I knew what the magic word was. Some things work on most sites but there is that magic site that does not want to work for whatever reason. I keep pinging on the php settings since I think it has to be something that basic that maybe set to on or off at most sites and the complete opposite at those problem sites. Most definately a configuration issue of some sort.
That junk is usually when you have compression turned on TWICE somewhere - i.e. the second compressor is trying to compress the first.
Ahhhhhhh!!!!!!!!

Zlib only turned on in threads... leave it off in photopost?

I haven't tested... but that makes alot of sense.

Thanks Michael.
Posted By: AKD96 Re: UBBThreads/Photopost Integration Version 2 - 05/21/2003 5:14 AM
Is this mod around for ReviewPost?
Yeah, there is a mod I posted for both RP and PP.

http://www.viperalley.com/ubbthreads.php
Michael he is talking about the integration mod this one not the photo/review on the ubbthreads.tmpl

No Josh this hack is not around for Reviewpost as I do not own it.

However it is rather complex. I beleive I showed you the first two files that need to be done as a teaser of what can be done. However Reviewpost does not use class calls yet.

The work that needs to be done is going in and placing the tbopen and tbclose variables into 10 different files as well as replacing all global calls with class calls. The you need to add those new class calls to each and every stylesheet to make it work.

It would take a couples of hours to do all that. I did index.php and pp-inc.php which should show you how it is done by looking at them.

If you have any other questions shoot me a private message.
Posted By: JoshPet Re: UBBThreads/Photopost Integration Version 2 - 05/21/2003 11:49 PM
I've done review post. It was a lot of trial and error adding the CSS classes and tbopen and tbclose calls in.

Havent' figured out my changes enough to post it.


Yeah I actually did half but that was just playing while helping Josh(AKD96) with his Reviewpost. It was real easy for me as Michael' both products coding are very similar so not so much trial and error for me. Beyond compare works wonders but still it is about 2-3 hours to do it. Just not sure if I want to invest the time in something I have no use for.
Posted By: JoshPet Re: UBBThreads/Photopost Integration Version 2 - 05/22/2003 12:08 AM
Yeah, the mod was very similar between the 2.
Yep the code is very similar between both products
Posted By: AKD96 Re: UBBThreads/Photopost Integration Version 2 - 05/22/2003 12:21 AM
:nodding and smiling:
v2 should jump to pp4 standards
I have templates for RP done up.... Inspired by all my hacking on Threads; will be a natch for us guys to hack up!
Michael I made a few corrections to the RP templates you had in the hack as they did not have the rp_ prefix before the tables and the photo call still has photo and not product

If you got these issues with your new templates thats cool. If not just a FYI
Oh, ok. I havent gone back and updated that.... I'll have to go back and update those.

I've been meaning to improve the queries to list the cats, too. Use an array versus repeated calls.

Too many things to do and not enough waking hours.

Here is the template for reviewpost with those changes to get it to work.

Attached File
81806-ubbt_reviewpost.txt  (571 downloads)
Omegatron just applied this hack to my site and I looks AWESOME!!!

Check it out www.socaps.com



THANKS Omegatron
Posted By: AKD96 Re: UBBThreads/Photopost Integration Version 2 - 05/28/2003 1:04 AM
So you're saying the style integration for RP is around somewhere???
Josh It is not around anywhere since I do not own Reviewpost. What I am saying is that the files are so similar to Photopost I could hack the files using the Photopost equivilent renamed of course in Beyond Compare and probally get them compared in an hour. But since I do not own the product I can not release such a hack. How do you think I teased you by showing you what could be done with the two main files.
Posted By: AKD96 Re: UBBThreads/Photopost Integration Version 2 - 05/28/2003 3:00 AM
Well, I've been hacking at the code. My review post section now resembles the rest of my site. What's a fella gotta do to have someone come in and fix it so it's all perty-like?
Did you add all the class codes to your stylesheet??

If you are unable to do what you need there are plently of developers here that are able to do the work for you at a reasonable charge.
Posted By: AKD96 Re: UBBThreads/Photopost Integration Version 2 - 05/28/2003 5:14 AM
I haven't gone through and added the classes to every stylesheet. I just wanted to get ONE style looking good so I can build off of that. I've gotten a lot done, so there isn't but a little bit of work left. At least, I think. Basically, I just want to get fixed what I haven't been able to figure out.

So yeah, name your price.

Josh if ya have something to ask about me helping you complete the modification Private Message me on this. I will most likely respond tonight when I get home.
Posted By: xtc Re: UBBThreads/Photopost Integration Version 2 - 05/29/2003 10:13 PM
Trying to install this mod... I've run into a problem applying the diffs to pp-inc.php. I added lines 18-48 but then all the rest of the line numbers are way off. I assume the new line 199 is supposed to replace the line above it (like in the other diff files which, BTW, I had no trouble with) but it's actually on line 191 and it goes downhill from there. I'm running PP 3.3.1. I'm wondering if my pp-inc.php is different than the one you used.

Also, the file CSS-additions.txt. I assume this goes in threadshome/stylesheets/*.css ? Do I just paste it in on the end of each or is there more I have to do?

Thanks for your help,
Duane


The Diff files read as follows. The one line which has a line number scratched out is the old code and line number. The new code corresponds to what the line number will be with the modification. All the other changes in the diff file that far down should not be too hard to spot. Look closely right around and compare the lines numbers. Beyond Compare is the best if your not using it.

The CSS additions you are correct get done to ALL stylesheets. You need to set the colors on the classes as instructed. After you cut and paste you need to replace DARKTABLE with the darktable color etc and do this for every new class converting to what color it is going to be. This is usually the longest step in this hack as I have over 25 stylesheets.
Posted By: xtc Re: UBBThreads/Photopost Integration Version 2 - 05/30/2003 5:03 AM
Yeah, I figured out how it works, like I said I patched the rest of the files and had no trouble. It's just this one that's way off on the numbering.

I don't know why everything has to be so difficult with Windows. Unix is so much easier:

diff file1 file2 > diff.txt #create diff file

patch -i diff.txt file1 #apply diffs to file

And diff/patch are standard unix utilities. No need to download and install some third party application.

As you can probably tell, I don't do windows. Or at least I do them as little as possible.

I'll give it another shot.

Thanks again,
Duane

Posted By: xtc Re: UBBThreads/Photopost Integration Version 2 - 05/30/2003 6:37 AM
Well, I tried it and it didn't work as expected. I had to back out the changes. I guess I'll have to fiddle around with it some more and try to figure out what went wrong.

Duane
Well the best thing I can tell you is PM me on this and I will see where your problem is. The changes are pretty simple and the pp-inc.php file has not changed really that much between 3.3.1 and the beta.
© UBB.Developers