|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Oh my your making my day.  A new version of Photopost to play with soon and finally Reviewpost HMM I am gonna be busy. I assume your sticking with 3.3 being the CSS version with templates coming later in like 3.4? At least thats what I remember on our last conversation.
|
|
|
|
Joined: Aug 2002
Posts: 111
Journeyman
|
Journeyman
Joined: Aug 2002
Posts: 111 |
I'm having one problem with this integration.
I only employed part of the hack. On my Threads board, I have a row of photos that says, "The latest photos added to our Photo Gallery". There, I call the 5 latest pics that have been uploaded, and the hack works fine.
I'd like to restrict these pics to the 5 latest photos uploaded from one specific gallery. However, when I try to edit the hack to list the gallery id (in my case, 503), I end up getting an error (the page stops loading after the "5 latest pics" title). I assume the line of code where I'm having problems is the one that reads:
$forcats = "";
I can't figure out what I'm doing wrong. I just insert the category number inside the quotes, right?
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Coy,
You can thank JoshPet for this fix. The code was missing a farther defining. It needs the following peice of code in there.
BELOW this: // which type of images do you want to show $q_switch = "random";
ADD THIS:
if ($forcats) { $forcats = "AND cat = '$forcats'"; }
I already tested this and it works great. Kudos to Josh.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
 Coy can't seem to get away from me. 
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
LOL Yes well what would alot of people do around here without you to help them out 
|
|
|
|
Joined: Aug 2002
Posts: 111
Journeyman
|
Journeyman
Joined: Aug 2002
Posts: 111 |
[]  Coy can't seem to get away from me.  [/] Thank goodness! Thanks to Josh (and everyone involved) for the fix. I'll go give it a try now.
|
|
|
|
Joined: Aug 2002
Posts: 111
Journeyman
|
Journeyman
Joined: Aug 2002
Posts: 111 |
I never did get back here to comment that this fix still doesn't work for me. If I try to specify a category, I end up with no photos displaying at all. I've tried a bunch of different category numbers with no success. Also, I just noticed that My Optional Stats box doesn't display all the stats it should. Currently, it says: 599 Registered User(s).; threads and page views. 324 photos posted with 22,536 page views. You can see it's missing the total number of threads and page views. Have I set a path incorrectly? I tried to install the mod again using the most recent version in this thread, but the same thing happens. Thanks, as always http://www.iyarilimon.com/ubbthreads/ubbthreads.php
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Coy, Try this it works as I am using this on my site if ($forcats) { $forcats = "AND cat = '$forcats'"; } Then as far as the most version of this hack. You forgot the first step!  Your right though Michael's hack has this left out. I had to tweak a few things. There is a query you have to add to ubbthreads.php Check the hack and install the part in that file for the stats to show.
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
The most recent rendition of this hack is on page four.
Here is the code from the hack you need to add that your missing.
In Ubbthreads.php after:
// --------------------- // Grab the tablewrapper list($tbopen,$tbclose) = $html -> table_wrapper();
add this:
$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: Aug 2002
Posts: 111
Journeyman
|
Journeyman
Joined: Aug 2002
Posts: 111 |
Omegatron << Then as far as the most version of this hack. You forgot the first step! >>
You are absolutely correct -- I had neglected the ubbthreads.php portion of this mod. Unfortunately, now that I've added it (and verified that I've included the recent fix for displaying particular categories), it still isn't working.
As you know, I've had problems with other aspects of Photopost when mods are concerned. For now, I'll chalk this up to quirks of my system, and ask Josh to do some investigative work for me while he works on my elusive "table wrappers" issue.
|
|
|
|
Joined: Nov 2001
Posts: 52
Power User
|
Power User
Joined: Nov 2001
Posts: 52 |
Hi All,
It has been a while since I actively added anything here, but this hack has a serious !!! security issue in it.
I will not post it here but I should be very carefull in applaying it as it gives others some most usefull info.
I sended a PM to omegatron about it.
Best Regards, Boris
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
That is just so weird. All the thing in ubbthreads.php is a query to get the totals. The defined output is called in the table in the template. I tell you YOU AND PHOTOPOST have issues.
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Boris it isnt my hack but I have modified the version here of mine on page 4 with a fix for this security hole. I have emailed the main author of this program to place this fix on all of his sites and his version of the hack as well. Thanks for the heads up. Although one can see the MYSQL password info. If everyone sets their host to localhost which everyone does anyway there is no way for them to use the information they can see. However it is best to move that into a PHP file which I did and then set a require statement in the template to use such said file.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
[]Coy, Try this it works as I am using this on my site if ($forcats) { $forcats = "AND cat = '$forcats'"; } Then as far as the most version of this hack. You forgot the first step!  Your right though Michael's hack has this left out. I had to tweak a few things. There is a query you have to add to ubbthreads.php Check the hack and install the part in that file for the stats to show. [/] Omegatron.... my fix doesn't work if you want to list more than one category like this: $forcats = "511,507,522"; Modify the code like this: if ($forcats) { $forcats = "AND cat in ($forcats)"; } That will allow for multiple categories to be included.  Coy's problem was that she was listing the main categories... which had no photos.... you have to list the category number of the subcategory which actually has the photos. 
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
LOL I thought I pasted the new code in their. To many freaking files. I do know it works though as I am using it 
|
|
|
|
Joined: Oct 2002
Posts: 165
Member
|
Member
Joined: Oct 2002
Posts: 165 |
Anybody encounter and fix the issue with Username changes in UBBT, which does not change the username in Photopost?
I allowed several name changes and now have users wanting to re-upload ther same photos under their new name.
Thanks
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Mike,
Try this fix and you should be set.
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";
|
|
|
|
Joined: Oct 2002
Posts: 165
Member
|
Member
Joined: Oct 2002
Posts: 165 |
Chuck,
Thanks for the quick response.
That fix allows me to interact with the UBBT DB from PP, but I don't know that it will correct the underlying issue... - Username "AA" establishes a member gallery and photos are referenced as "Member: AA"
- User AA changes display name to "BB" in UBBT
- Photopost gallery still refernces "Member: AA".
The link in PP will bring you to the correct member profile in UBBT, but the point is that the photos in PP are referencing another name than what the user is now displaying.
As I do this.... I remembered that I chose to access the UBBT DB through PP, but I use a seperate MySql DB for PP. I thought using a seperate MySql would be easier if I ever had to split the UBBT and PP onto different servers due to high demands.
Mike
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Give me a few to look through the files and see what I can find out.
|
|
|
|
Joined: Feb 2002
Posts: 950
Hacker
|
Hacker
Joined: Feb 2002
Posts: 950 |
$num_rows = $dbh->total_rows($sth);<br /> if ($num_rows >= 1) {<br /> list($num_replies,$num_thread_views) = $dbh->mysql_fetch_row($sth);<br /> if ($num_rows >= 2) {<br /> list($num_threads) = $dbh->mysql_fetch_row($sth);<br /> }<br /> } I had to make a slight change to this section to get the right numbers to show up.
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Cool you are the php guru
I can't wait till you upgrade to 6.2 so we can finally get the lightbulbs to work right.
|
|
|
|
Joined: Feb 2002
Posts: 950
Hacker
|
Hacker
Joined: Feb 2002
Posts: 950 |
$userob = new user; <br /> $user = $userob -> authenticate("U_FrontPage, U_Groups, U_TimeOffset,U_Display,U_Favorites,U_WhichForums,U_Categories,U_Number"); <br /> $Username = $user['U_Username']; <br /> $UserID = $user['U_Number']; <br /> You need this piece in the ubbthreads.php and the light bulbs will work. Notice the addition on U_Number and the assignment of $UserID
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Sweet!! Knew it was something simple. You the man!!
|
|
|
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.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|