Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
MOD NAME: Photopost / ReviewPost and Ubbthreads Integrated Index Version 4

DESCRIPTION: Adds the Photopost Index and/or ReviewPost Index to Threads creating a seemless integration.

BY: Michael Pierce, Omegaton

DATE: 3-19-2003

CREDITS: Michael Pierce, Omegatron for XHTML compliance and updating for the tablewrappers and various bugfixes, JoshPet for bug fix with the forcats function.

VERSION: 4.0 for UBBThreads 6.2

REQUIREMENTS: A full version of UBB.Threads 6.2

COMPATIBILITY: UBB.Threads 6.2

DEMO: http://www.viperalley.com/ubbthreads.php

FILES MODIFIED: ubbthreads.php, ubbthreads.tmpl

NEW FILES: photopost.inc.php, ubbt_photopost.tmpl, reviewpost.inc.php, ubbt_reviewpost.tmpl

This new release builds on the preior work and also includes a version for the newly released ReviewPost. This Hack can be used to add one or both of the Integrated Index pages.
Attachments
73611-pp_rp_ubbt62.zip (0 Bytes, 86 downloads)

Last edited by extremebikini; 03/19/2003 5:57 PM.
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks Michael! Great work. Plan to utilize this myself shortly.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I think that seperating out the tmpl for each into their own files will make working with this hack much easier. Enjoy!

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Cool Michael I see you have been busy with getting Reviewpost out the door. Great work with these.

Just two minor things. I mean real minor. There is one minor XHTML problem and here is the fix. You forgot the tr tag on the featured photo.

FIND in ubbt_photopost.tmpl

echo <<<UBBTPRINT
$tbopen
<tr class="darktable">
<td class="tdheader" colspan="5" align="center">
Featured Photos
</td>
</tr>


REPLACE WITH:

echo <<<UBBTPRINT
$tbopen
<tr class="darktable">
<td class="tdheader" colspan="5" align="center">
Featured Photos
</td>
</tr>
<tr>

2) This is a picky thing some people might like. Depending on their site colors etc they may not like the Photo background white so I did this

FIND: bgcolor=/"#FFFFFF/" and REPLACE WITH class=/"darktable/"

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Thanks! Made those changes and uploaded a new ZIP!

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Great work on ReviewPost looks like you outdid your on this one.

Joined: Apr 2002
Posts: 610
Code Monkey
Code Monkey
Joined: Apr 2002
Posts: 610
awesome! I can't wait to get it!

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I must say the response has been amazing; we've had a tremendous volume of sales today on both of our products. As the only guy doing the coding for all three products, that makes me very happy.

And to think I already have 3.4 running on my test site!

Joined: Apr 2002
Posts: 610
Code Monkey
Code Monkey
Joined: Apr 2002
Posts: 610
well, for my site, it is the perfect addition. I could not have asked for anything more specific to my needs, other than maybe a 10 star rating system as opposed to five stars. It will need a tiny bit of customization, and maybe an extra field or two, but hey, I'm ecstatic as this is the first time something has came out that I wanted before I paid someone to have it custom done. Usually, it's right after.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
thanks for the update to a great set of addons Michael


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
3.4 Michael??

Isn't 3.3 still in beta?

Or is 3.4 Review posts version number.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
PhotoPost 3.3 has been released; PhotoPost 3.4 is under development already. ReviewPost 1.0 is the released version.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Cool I see that now I get to play and hack away at 3.3 to get it fully integrated into Threads cool.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I also wrote a snippet of code which I inserted in my index.php and showphoto.php/showproduct.php files which allows me to register people in these areas in the Who'se Online.

Basically, I saved the attachement as ubbt_online.php and then at the top of each PhotoPost/ReviewPost file I added:

include "ubbt_online.php";

Of course you have to add the "gallery" tag (or "reviews") to the languages/*/online.php files for the text to show up in the Who'se Online page.

$ubbt_lang['gallery'] = "Viewing Photo Galleries";
$ubbt_lang['reviews'] = "Viewing Product Reviews";

You can modify the "gallery" tag to put in "reviews" for ReviewPost.
Attachments
73798-whoonline.txt (0 Bytes, 59 downloads)

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
The good part is going to be writing up the code to get Photopost to use Threads stylesheets and put the 7 new classes in those stylesheets. I worked on it a bit with the beta but now that 3.3 is done I better hurry up and finish.

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
I'm having trouble getting this to work :-(

I followed all the steps in the txt file very carefully, but I keep getting the following error:

[]Parse error: parse error in /home/virtual/site12/fst/var/www/html/forum/templates/default/ubbt_photopost.tmpl on line 47
[/]
(the path is correct)

I run version 3.2.1 of photopost and UBBt 6.2.2

What could have gone wrong here ?

Regards,

Pasquale

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
did you happen to delete the ; after the path

Here try downloading this template and edit the path and upload.
Attachments
74083-ubbt_photopost.tmpl (0 Bytes, 77 downloads)

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
That worked! Thanks a lot....
(but I still don't see the difference between my tmpl file and yours)

Ciao,

Pasquale

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You most likely have a stray ascaii character.

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
I have two categories in my forum and after installing this module, I have a table with 4 random photopost images below it. How can I place this table between my two categories in stead of below them ?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Can you post a url to your forums so I can see what you have?

By default you will have the threads forums then the picture index then the Photopost forums.

Joined: Apr 2002
Posts: 610
Code Monkey
Code Monkey
Joined: Apr 2002
Posts: 610
just purchased my copy! not sure where to download it though?

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
I hope this image makes it all clear
[]http://www.multifire.nl/example.jpg[/]
So what I would like, is to have the images between the two categories, and not below them...

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
This is the way it was designed. The Photopost template is placed after the Threads categories. I know I could place the random photos up top of Threads categories. To do what you suggest would require a bit more hacking as in removing a part of the Photopost hack and placing it in essence between the category loop to the next one but on multiple category boards this would look bad. I have like 7 categories so you see what I am getting at? If you must want to begin with the Photopost hack then list Threads do this

Find the UBBTPRINT; up the top of the ubbthreads.tmpl file
right after this and before the echo <<<UBBTPRINT place your line

require ("/PATH/TO/ubbthreads/templates/default/ubbt_photopost.tmpl");



Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
A slight error in the instructions Michael

In the ubbt_photopost.tmpl:

Find
print "<td align="center" class=/"darktable/" width="20%">";
print "<br /><a href="". $url_path ."showphoto.php?photo=". $line["id"]. "">";
$temp_user = ($line["userid"]);

and change it to

print "<td align="center" class=\"darktable\" width="20%">";
print "<br /><a href="". $url_path ."showphoto.php?photo=". $line["id"]. "">";
$temp_user = ($line["userid"]);


Nikos
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
That might have been me Nikos. Back on the first page I must have been dislexic.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
LOL - It happens to the best of us Chuck!


Nikos
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Michael any idea why the categories would just dissapear. Photopost is running fine. The categories just up and dissapeared on this integration hack. The photo's are still there.

Joined: Jan 2003
Posts: 125
Journeyman
Journeyman
Joined: Jan 2003
Posts: 125
Indeed, both of these scripts are wonderful.

Quick question: is there a way to integrate the threads .css with both products? As in if a user has chosen a style sheet other than the default that the stylesheet will also be used in RP and PP?

A bit off topic but thought somebody might now how to do this...

chillin

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Chillin,

I wrote up the hack for this. You can see it at my site.

http://www.reeftalk.com

Here is the link to the thread where the hack is located here in the Forum Design Integration forum.

https://ubbdev.com/forum/showfl...ew=collapsed&sb=5&o=&fpart=1

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Is is possible to exclude a category from being shown on the index page ? I would need this because sometimes the random gallery shows pictures which are not very "suitable" for the main page

Thanks,

Pasquale

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
In ubbt_photopost.tmpl look for the code below

// leave blank for no customization, otherwise list cats you only want images to appear from
$forcats = "";

in between the quotes put the category NUMBERS for the ones you want listed example 502,504,503,501

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
That doesn't work. Here's my code:

[]// leave blank for no customization, otherwise list cats you only want images to appear from
$forcats = "500,502,503,504,505,506,507,510,513,514,515,516,517,518,519,520,521,523"; [/]

Even with one or less numbers I get "Query Failed" on the index page.

Thanks for helping me! []http://img.neoseeker.com/m/26412_photo.gif[/]

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
If you look at the $query below, you'll notice that you have to format the query in that string.

$forcat = "AND cat IN (500,502,503,504,505,506,507,510,513,514,515,516,517,518,519,520,521,523)";

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Ok great, thanks!
But isn't it possible to exclude a certain cat ? Now I will always need to keep ubbt_photopost.tmpl up-to-date with new categories.... Also it seems to me that it slows down the query execution.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I have to be a pain in the arse and have different ubbthreads.tmpl coding. The section in question in the instructions looks slightly different in my code. Here is the area:

[]
</tr>
UBBTPRINT;
} //UBBTREMARK
echo <<<UBBTPRINT
<!-- END OF FORUM LOOP -->
$tbclose
<br />

UBBTPRINT;
} //UBBTREMARK
echo <<<UBBTPRINT
<!-- END CATEGORY LOOP -->

$tbopen
<tr>
[/]

I've tried sticking the code in various places to no avail. Any idears?

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
ulling out hair:

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Here is what mine looks like for 6.2.3

What version are you running?

UBBTPRINT;
} //UBBTREMARK
} //UBBTREMARK
echo <<<UBBTPRINT
<!-- END CATEGORY LOOP -->
<!-- END OF FORUM LOOP -->
$tbclose
UBBTPRINT;
require ("/usr/local/blah/blah/blah/ubbt_photopost.tmpl");
echo <<<UBBTPRINT
<br />

Look for the close of the Threads category and forum tables and add this directly after filling the path in to the template

UBBTPRINT;
require ("/usr/local/blah/blah/blah/ubbt_photopost.tmpl");
echo <<<UBBTPRINT
<br />


Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I am running 6.3b4.

My template is different though, since I don't use the stock template.

I will attach my .tmpl file.
Attachments
81282-ubbthreads.zip (0 Bytes, 15 downloads)

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I've placed:
[]
UBBTPRINT;
require ("/home/drumlin/public_html/threads/templates/default/ubbt_reviewpost.tmpl");
echo <<<UBBTPRINT
<br />
[/]

Below:
[]
UBBTPRINT;
} //UBBTREMARK
echo <<<UBBTPRINT
<!-- END CATEGORY LOOP -->
[/]
and above:
[]
$tbopen
[/]
. . .and I get a "Query failed" and the rest of the page (footer) does not render.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
And yes, my ubbthreads.php file does include:

[]
// ---------------------
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();

$sth = $dbh->do_query("
SELECT COUNT(B_Topic), SUM(B_Counter)
FROM {$config['tbprefix']}Posts
GROUP BY B_Topic
ORDER BY B_Topic
");
list($num_replies, $num_threads, $num_thread_views) = array(0, 0, 0);
$num_rows = $dbh->total_rows($sth);
if ($num_rows >= 1) {
list($num_replies) = $dbh->mysql_fetch_row($sth);
if ($num_rows >= 2) {
list($num_threads, $num_thread_views) = $dbh->mysql_fetch_row($sth);
}
}
$dbh->finish_sth($sth);
$num_posts = $num_threads + $num_replies;
[/]

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Josh,

I run beta4 on my test site. This hack works fine. Your template is a bit whacked from a stock template. Here is where it needs to be. Add everything between the $tbclose and $tbopen

<!-- END CATEGORY LOOP -->
<!-- END OF FORUM LOOP -->
$tbclose
<br />
UBBTPRINT;
require ("/usr/local/blah/blah/blah/templates/default/ubbt_photopost.tmpl");
echo <<<UBBTPRINT
<br />
$tbopen

Also did you fill out the photopost.inc.php file with your settings and upload it to your threads directory?

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Okay, but my code doesn't look like that.

But think I got it right with what I tried before. It still says Query failed though. So I think I have it in the right place in ubbthreads.tmpl, the problem is somewhere else.

I'm using this for ReviewPost, BTW. I filled-out and uploaded reviewpost.inc.php to the folder above my root. This is where I keep my config.inc.php file, and the instructions said to put it in the same folder. For good measure, I copied the file to my threads directory as well, but that did not help.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Thats right you took the free Reviewpost.

If it says Query failed then it is a MYSQL problem connecting. I would double check the settings.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Roger that.....

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Settings are all correct

$rpurl_path...check
$rpdata_dir...check
$rphost...check
$rpuser...check
$rppassword...check
$rpdatabase...check

What file calls reviewpost.inc.php anyway?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
The ubbthreads.tmpl calls reviewpost.tmpl and that template calls the reviewpost.inc.php
Attachments
81314-ubbthreads.txt (0 Bytes, 115 downloads)

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
same for me

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)