Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Photopost "gallery" clickable icon in postbit(_legacy) and/or profiles. Details »»
Photopost "gallery" clickable icon in postbit(_legacy) and/or profiles.
Version: 1.00, by mini2 mini2 is offline
Developer Last Online: Oct 2010 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-01-2006 Last Update: 04-01-2006 Installs: 33
 
No support by the author.

Gone

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-10-2006, 12:30 PM
KBowers KBowers is offline
 
Join Date: Nov 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mini2
I'd imagine adding the following from the hack you have installed
Code:
$link = mysql_connect ("localhost", "$dbuserid", "$dbuserpassword") or die('I cannot connect to the database.');
mysql_select_db ("pp_database")or die("Could not select photopost database");
(replacing dbuserid and dubuserpassword with your correct details) to the gallery.php above the "$photo_query" line might do it.
OK, I tried that and I still get the same error message as I posted above... :cross-eyed:
Reply With Quote
  #13  
Old 05-11-2006, 09:19 PM
rrr rrr is offline
 
Join Date: Oct 2004
Location: California
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this work for vbAdvanced Gallery?
Reply With Quote
  #14  
Old 05-14-2006, 05:59 PM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My gallery.php contains the following:
Code:
$photo_query=$vbulletin->db->query_read("SELECT userid FROM photo-gallery.photos");
When trying to exect the file through cron I get the following error message:

Invalid SQL:
SELECT userid FROM photo-gallery.photos;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-gallery.photos' at line 1
Error Number : 1064

It's almost as if the PHP doesn't like the '-' in my database name. Anyway to fix this?
Reply With Quote
  #15  
Old 05-15-2006, 10:36 AM
Schahab Schahab is offline
 
Join Date: Jan 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great JOB!

Works fine! Thank you very much!
Reply With Quote
  #16  
Old 05-16-2006, 09:43 AM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by criscokid
My gallery.php contains the following:
Code:
$photo_query=$vbulletin->db->query_read("SELECT userid FROM photo-gallery.photos");
When trying to exect the file through cron I get the following error message:

Invalid SQL:
SELECT userid FROM photo-gallery.photos;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-gallery.photos' at line 1
Error Number : 1064

It's almost as if the PHP doesn't like the '-' in my database name. Anyway to fix this?
Anyone able to offer any assistance?
Reply With Quote
  #17  
Old 05-18-2006, 01:59 PM
KBowers KBowers is offline
 
Join Date: Nov 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mini2
Really not sure on that one at all.
Darn... oh well... if anyone can figure this out I'd really appreciate the info.
Reply With Quote
  #18  
Old 05-21-2006, 09:31 AM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mini2
criscokid, maybe try putting ' either side of the database/table name? 'photo-gallery.photos'?
Done that - now running this scheduled task results in the following error message being displayed:
Parse error: parse error, unexpected T_STRING in \wwwroot\forums\includes\cron\gallery.php on line 21

This is line 21 of gallery.php:
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."userfield SET field38 = 'Yes' WHERE ".TABLE_PREFIX."userfield.userid = $posid AND ".TABLE_PREFIX ."userfield.field38 != 'Yes'");
Reply With Quote
  #19  
Old 06-06-2006, 10:50 AM
SHalliday's Avatar
SHalliday SHalliday is offline
 
Join Date: Jan 2002
Location: Norwalk, CT
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is an absolutely awesome hack! It's exactly how a gallery check should be setup for postbit processing.

Unfortunately my forums and classifieds are setup in separate databases and after spending a considerable amount of time yesterday and today, I still have not been able to get this to work. The problem is most likely my lack of php skills and mysql knowledge. I desparately want to implement this hack. Can anyone please help outy posting a gallery.php cron file that works for separate databases. I will gladly pay for this.

From looking at another hack that retrieves the most recent photos for memberinfo display, the connection code looks like it should be something like this:

Code:
$pppath = "/www/allfordmustangs.com/photopost";
require "{$pppath}/config-int.php";
$link = mysql_connect ("$host_bb", "$user_bb", "$password_bb") or die("Could not connect to the PhotoPost Classifieds database.");
mysql_db ("photopost", $link)or die("Could not select Photopost database");
$db_link = mysql_connect("$host_bb", "$user_bb", "$password_bb") or die ("Could not connect to the Members database.");
Could the problem here be that it needs to be connected to two databases at the same time? One to fetch and the other to update? I am sure my lack of knowledge here is really showing through. Everything else seems straightforward but the gallery.php is killing me.

Any and all help with this would be greatly appreciated.

Regards,

Scott Halliday
Reply With Quote
  #20  
Old 06-06-2006, 11:38 AM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by criscokid
Done that - now running this scheduled task results in the following error message being displayed:
Parse error: parse error, unexpected T_STRING in \wwwroot\forums\includes\cron\gallery.php on line 21

This is line 21 of gallery.php:
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."userfield SET field38 = 'Yes' WHERE ".TABLE_PREFIX."userfield.userid = $posid AND ".TABLE_PREFIX ."userfield.field38 != 'Yes'");
I still haven't been able to solve this problem - anyone able to assist?
Reply With Quote
  #21  
Old 07-04-2006, 09:07 PM
StuntFactoryX StuntFactoryX is offline
 
Join Date: May 2006
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT userid FROM photopost.pp_photos;

MySQL Error : SELECT command denied to user 'stuntfac_johnny'@'localhost' for table 'pp_photos'
Error Number : 1142
Date : Tuesday, July 4th 2006 @ 04:00:49 PM
Script : http://www.stuntfactoryx.com/forum/a...cron&cronid=15
Referrer : http://www.stuntfactoryx.com/forum/admincp/index.php
IP Address : 205.188.117.8
Username : Johnny
Classname : vb_database


im getting this error. any ideas? my vb3.5.4 does not use a prefix and my photopost uses the default pp_ and everything is in the same database. that is my user name and my database is stuntfac_vb
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:49 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07738 seconds
  • Memory Usage 2,303KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete