Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Mod Name / Version: Photopost / ReviewPost and Ubbthreads Integrated Index Version 4

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

Working Under: UBB.Threads 6.2-6.3

Mod Status: Finished

Any pre-requisites: A full version of UBB.Threads 6.2 or 6.3 and Photopost and or Reviewpost

Author(s): ExtremeBikini,Omegatron

Date: 04/28/03

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

Files Altered: ubbthreads.php, ubbthreads.tmpl

New Files: photopost.inc.php, ubbt_photopost.tmpl, reviewpost.inc.php, ubbt_reviewpost.tmpl



Database Altered: No

Info/Instructions: 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.

Demo can be seen at http://www.reeftalk.com/ubbthreads/ubbthreads.php

Attachments
78030-pp_rp_integration.ZIP (0 Bytes, 132 downloads)

Sponsored Links
Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
Tried this one Omegatron but its not working for me.

There is one mistake in your instructions:

Point 4 should be:
and insert after:
Code
<br />    UBBTPRINT;<br />    <br />    //<br />    // PhotoPost and ReviewPost inserts<br />    //<br />    require("/home/sites/viperalley/web/templates/default/ubbt_photopost.tmpl");<br />    require("/home/sites/viperalley/web/templates/default/ubbt_reviewpost.tmpl");<br />    <br />    echo <<<UBBTPRINT<br />


Change the /home/..... to your absolut path to the files.

and line 47 of ubbt_photopost.tmpl must be:
Code
<br />print "<td align=\"center\" class=\"darktable\" width=\"20%\">";<br />


and not:
Code
<br />print "<td align=\"center\" class=/"darktable/" width=\"20%\">";<br />


But also with all these changes the hack will not work for me. I am getting a QUERY error on my forum main page...

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Well actually this is not my hack. This hack was written by Michael Pierce the creator of Photopost. I merely did XHTML compliance and a few minor other things. I posted it here from the beta modifications when Josh made this wonderful new Modification Index.

The instructions are a fine from what I see. They clearly state to change PATH INFORMATION to your own. I see he put his own path information which was an example. I updated them to make it even more clearer so the example Michael gave of

UBBTPRINT;
//
// PhotoPost and ReviewPost inserts
//
require("/home/sites/viperalley/web/templates/default/ubbt_photopost.tmpl"); require("/home/sites/viperalley/web/templates/default/ubbt_reviewpost.tmpl"); echo <<<UBBTPRINT

UBBTPRINT;

//
// PhotoPost and ReviewPost inserts
//
require("/path/to/templates/default/ubbt_photopost.tmpl");
require("/path/to/templates/default/ubbt_reviewpost.tmpl");

echo <<<UBBTPRINT

Okay well if you get a MYSQL error that is easy.

Double check to see you did instruction #1

1) Edit the photopost.inc.php and reviewpost.inc.php files with your settings and upload to your config.inc.php location

If you did that then double check instructions #2

2) Edit the ubbt_photopost.tmpl and/or ubbt_reviewpost.tmpl to change the first line:

For ubbt_photopost.tmpl:

require ("/path/to/photopost.inc.php");

For ubbt_reviewpost.tmpl

require ("/path/to/reviewpost.inc.php");

THE ERROR YOU DESCRIBE IS CAUSED BY NOT DOING ONE OF THESE TWO STEPS CORRECTLY.


Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I plan to go back over these soon as PP4 is out and RP2 is in BETA. I'd like to improve the efficency of this hack; so will work on it soon.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Cool Michael,

You got to Reviewpost very quickly good job.

Sponsored Links
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
The admin menu dosnt work is this a general issue ? somthing to do with the frames maybe ? I can however get to adm-menu.php.


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
What do you mean? This hack does nothing with the admin menu. This adds Photopost on the UBBTHREADS main index.

You may be experiencing a Photopost issue which is best asked over at Photopost or you can PM and I will see if I can answer your question.

Now if you are referencing this hack here ----->

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

If you followed the instructions to a tee the admin menu works just fine.

Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
DOH ! Cheers

One more thing can I get PP4 to use my UBB stylesheet ?


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
The hack I referenced above allows Photopost to use Threads stylsheets and headers and is for Photopost 4.

Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
On the Admin thing when I got adm-inc.php the page dosnt finish and only the UBBmenu shows, but if I go directly to adm-menu.php it works I think its the frames it dosnt like, I have completely un hacked it and folowed the instructions above to the letter but it still does it, any ideas ?>


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You need to follow the all steps in the instructions for the menu frameset to work.

If you don't mind I have no problem looking at your admin files and seeing what is not correct. My email is public just email me the three admin files and I will look at em or PM me here.

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
Hi Omegatron,

I checked all the settings and gave it a try again but I still get the QUERY FAILED error.

I killed the Reviewpost inc and tmpl. cause I only have pp installed but it did not work. The pathes are correct.

Any idea or do you need more information?

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
Ok I tested a little bit more and it has something to do with the queries. I am using UBBT 6.2.3 and PP4 and want to have pictures on my forum main index by random from PP.

Can someone help me or check the queries?

I am not using reviewpost.inc and the reviewpost template file, only the photopost stuff is needed.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
The Queries have not changed from Photopost 3.3 to 4.0.

I have used the same main index hack for 3 versions of Photopost now.

Do you have some sort of error code to post? You need to post more accurate information or either PM me and I can see what I can do for you.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
This has been updated to take into account Table Prefix's in the new Software by Photopost. Some people where having trouble with query fails as a result of the prefix.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
In the members' area... hopefully my issues are fixed


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
That reminds me - Michael sent me an upgrade for her - but I haven't had a chance yet.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yeah he told me he was going to send that over.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Ugh - who do I need to send what to? I'm in shutdown mode from the past few weeks and suffering from brain freeze.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Did you not send that to Josh. He said he recieved it. I did the integration with the first beta. I am sure Josh when he gets time can place the $tbopen and $tbclose where they need to be. If he wants me to do it I am sure he will send it over. I know we at Threadsdev are glad the hard work you do to give us wonderful products.

I still need to upgrade my Photopost to 4.0.1 Just need to get the time to modify it

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
After installation I'm getting this error:
"Parse error: parse error, unexpected T_STRING in /home/virtual/site101/fst/var/www/html/test/templates/default/ubbt_reviewpost.tmpl on line 49"
The photopost index integration works fine, but below that I got this error.

Any idea ?

Last edited by Pasqualist; 07/13/2003 5:06 AM.
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Here is what I see.

print "<td align="center" class=/"darktable/" width="20%">";

This should fix it

print "<td align="center" class="darktable" width="20%">";

Thanx

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Well...it made the error disappear, but the integrated review index doesn't appear
Before this error I did see the extra information table, but now it also doesn't show...

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
If nothing shows up most likely the error is that you did not fill out the necessary MYSQL access information in reviewpost.inc.php thus it is hanging at the template call.

Now that the template error is corrected go back and redo the instructions for this hack. I just installed this at my test site fine.

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Ok, I found a typo in my ubbt_reviewpost.tmpl, but now this is fixed I have a new error!
Now in stead of hanging I get "query error"...grrr

What's next ?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Did you fill in your table prefix if any in the top of the ubbt_reviewpost.tmpl like the directions tell ya. Usually by default this is rp_

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Haha...yes, that was missing

Ok, step 3 ... (still getting an error!!)
"Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/virtual/site101/fst/var/www/html/test/templates/default/ubbt_reviewpost.tmpl on line 252

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/virtual/site101/fst/var/www/html/test/templates/default/ubbt_reviewpost.tmpl on line 253"

This error appears between the review image and the review cats. That should be the statistics part...

Can I simply remove these lines from ubbt_reviewpost.tmpl ?:

[] $query = "SELECT SUM(views) as tviews, COUNT(*) AS tphotos FROM products";
$totalv = mysql_query($query, $rplink);
list( $totalpviews, $products ) = mysql_fetch_row($totalv);
mysql_free_result($totalv);

$totalpviews = number_format( $totalpviews );
$prototal = number_format( $products );[/]

If I do that, all works fine!

Last edited by Pasqualist; 07/13/2003 6:01 PM.
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Nope instead change those lines you posted to this


$query = "SELECT SUM(views) as tviews, COUNT(*) AS tphotos FROM {$Globals['pp_db_prefix']}products";
$totalv = mysql_query($query, $rplink);
list( $totalpviews, $products ) = mysql_fetch_row($totalv);
mysql_free_result($totalv);

$totalpviews = number_format( $totalpviews );
$prototal = number_format( $products );


Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
I probably had a bad hacking of some files but now I have Login/Logout problems (Only in Photopost):

Warning: Cannot add header information - headers already sent by (output started at /home/sites/site185/web/Forum/templates/default/ubbt_header.tmpl:18) in /home/sites/site185/web/Foto/logout.php on line 32

Warning: Cannot add header information - headers already sent by (output started at /home/sites/site185/web/Forum/templates/default/ubbt_header.tmpl:18) in /home/sites/site185/web/Foto/logout.php on line 33

Warning: Cannot add header information - headers already sent by (output started at /home/sites/site185/web/Forum/templates/default/ubbt_header.tmpl:18) in /home/sites/site185/web/Foto/logout.php on line 34

And than I'm still logged in, similar error for people trying to login and after the error they are still logged out...

Any idea ?

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
From memory - look for a space after the final >


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
Uh, thank you for the tip but I'm not able to understand what you mean...
Wich file should I doublecheck ?

Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
I may add this later, but right now I want to get the registered and unregistered template files showing up in my photopost installation. Could someone tell me which file/files I need to alter in photopost 4.01 to add the threads menu? Thanks.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
[]Rutto said:
Uh, thank you for the tip but I'm not able to understand what you mean...
Wich file should I doublecheck ? [/]

Usually 'header already sent' errors are extra spaces after the PHP closing tag ?> at the end of the file. Make sure there's nothing after that closing tag.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
OK, it is a problem related to the Hacking of pp-inc.php in fact I have re-uploaded the original pp-inc.php and it worked fine.
I re-hacked it following the instruction, uploaded it again and... same error.

Last edited by Rutto; 07/14/2003 4:00 PM.
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
well try copying a line or so at a time instead of the whole thing. This is working on many sites. However I have seen one or two sites with that specific problem. Like Ian said most likely a stray character is being displaced somewhere. Alot of times this would be at the end before the closing tag. If not this then it could be a server specific thing from a PHP config.

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

The ubbthreads registered/unregistered templates are send along with the headers. There is no specific call to those templates alone. It is part of the whole hack.

Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
[]Omegatron said:
well try copying a line or so at a time instead of the whole thing.[/]

Ok, I followed your suggestion and found out that this is the exact part of the instructions that create the problem.
I see a triple /// but changing it don't solve.

Code
<br />Find:<br /><br />require "config-inc.php";<br />require "languages/$pplang/pp-inc.php";<br /><br /><br />Insert Below this and set path to main-inc.php:<br /><br />if ( basename($GLOBALS['SCRIPT_NAME']) != "adm-index.php" && basename($GLOBALS['SCRIPT_NAME']) != "adm-menu.php" ){ <br /> <br />/// Require the library. Edit the path to the<br />// main.inc.php file if necessary.<br />   require ("/PATH/TO/main.inc.php");<br /><br />// If you use IIP's sidebar you may want to uncomment the line below<br />// to disable the sidebar on Photopost pages<br />// $config['iip_call'] = 1;<br /><br />// ---------------------<br />// Send the page to them<br /><br />   $html = new html;<br />   $html -> send_header($Cat,0,$user);<br /><br />// ---------------------<br />// Grab the tablewrapper<br />   list($tbopen,$tbclose) = $html -> table_wrapper();<br /><br />    // If they don't have a stylesheet pref we use the default<br />      if (!$fstyle) {<br />			if (isset($user['U_StyleSheet'])) {<br />         	$fstyle = $user['U_StyleSheet'];<br />			}<br />      }<br />      if ( (!$fstyle) || ($fstyle == "usedefault") ) {<br />        $fstyle = $theme['stylesheet'];<br />      }<br /><br />      $theme['css_wrapper'] = $fstyle;<br /><br />   // --------------------<br />   // set the style sheet<br />      $stylesheet = "{$config['stylepath']}/$fstyle.css";<br /><br />}<br />

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

Contact me privately as I will and we can see what can be done with this. However you are talking in the wrong thread as this is not the hack you are trying to do. Email me and I will see what your problem is. As I stated I have seen this on one or two sites. It could be a server setting with Header issues.

Joined: Apr 2001
Posts: 18
User
User
Offline
Joined: Apr 2001
Posts: 18
How can I integrate PhotoPost 4.0.1 to work with "Facelift for UBBThreads" templates? I want it to look like it does on this site!

Regards
/Stefan

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
This hack just places Photopost on the main index. If you want to make Photopost look like Threads and use the header and stylesheets like here and other sites you need to download this hack I did here at this link

https://www.ubbdev.com/forum/showflat.php?Cat=&Number=82531

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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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)