Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

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
  #32  
Old 12-12-2006, 12:50 PM
funkmeister funkmeister is offline
 
Join Date: Oct 2004
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To clarify......in 'gallery.php' do we replace the field id number (field61 in the example below) with whatever our field number is, which is created earlier in the instructions?

Quote:
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."userfield SET field61 = 'Yes' WHERE ".TABLE_PREFIX."userfield.userid = $posid AND ".TABLE_PREFIX ."userfield.field61 != 'Yes'");
Thanks in advance.
Reply With Quote
  #33  
Old 02-20-2007, 08:25 AM
Grunt Grunt is offline
 
Join Date: Aug 2002
Location: TN
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks once again Mini - good stuff.

Working in 3.6.4 and PP 5.6.2 (sharing DB and no prefixes on either). I had to modify code a bit. Working code if it helps anyone is:

postbit:
Code:
<if condition="$post['field7'] == 'Yes'">
<a href="/gallery/showgallery.php?cat=500&ppuser=$post[userid]" target="_blank">
<img class="inlineimg" src="$stylevar[imgdir_misc]/gallery.gif" alt="View $post[username]'s Gallery" width="19" height="18" border="0" title="View $post[username]'s Gallery" /></a> 
</if>
gallery.php:
Code:
<?
////////////////////////////////////////////
//  MAKE SURE YOU EDIT THIS WHERE STATED  //
//  Then upload to /includes/cron/        //
////////////////////////////////////////////
// Edit - Make sure this is correct
define('FILE_VERSION', '3.6.4'); // this should match install.php
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db))
{
 exit;
}
// Edit this line to reflect your database structure
$photo_query=$vbulletin->db->query_read("SELECT userid FROM photos");
while ($inids = $vbulletin->db->fetch_array($photo_query)) {
 $posid = $inids[userid];
 $vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."userfield SET field7 = 'Yes' WHERE ".TABLE_PREFIX."userfield.userid = $posid AND ".TABLE_PREFIX ."userfield.field7 != 'Yes'");
}
log_cron_action("gallery task updated", $nextitem);
?>
Reply With Quote
  #34  
Old 02-20-2007, 08:31 AM
Grunt Grunt is offline
 
Join Date: Aug 2002
Location: TN
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and a different icon
Reply With Quote
  #35  
Old 02-23-2007, 08:12 PM
SherryG SherryG is offline
 
Join Date: Oct 2006
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*Solved*
Reply With Quote
  #36  
Old 03-21-2007, 05:46 PM
atvtrailrider atvtrailrider is offline
 
Join Date: Jan 2007
Location: Pacific Northwest
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the error I am getting when it runs the cron:

> MySQL Error : Access denied for user 'vborforumuser'@'localhost' to database 'photopost'

vborforumuser is set as the "User Database User" in my photopost config. I think the task needs to use my "PhotoPost Database User" instead. How do I get the task to run as a different user?

Suggestions?
Reply With Quote
  #37  
Old 04-27-2007, 02:54 PM
Doug Nelson Doug Nelson is offline
 
Join Date: Nov 2001
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has this been updated for 3.6.5?
Reply With Quote
  #38  
Old 05-03-2007, 02:59 AM
Doug Nelson Doug Nelson is offline
 
Join Date: Nov 2001
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would be a "no"?
Reply With Quote
  #39  
Old 08-10-2007, 07:04 PM
PEPITO69 PEPITO69 is offline
 
Join Date: Mar 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to make the same with reviewpost? showing the reviews of a member.
Reply With Quote
  #40  
Old 08-17-2007, 03:26 PM
sgrynd sgrynd is offline
 
Join Date: Sep 2006
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, great hack - running on 3.7 as well.

For those with the db error, make sure gallery.php is set to use the correct database and table name
Reply With Quote
  #41  
Old 09-19-2007, 08:06 PM
mirzonni mirzonni is offline
 
Join Date: Sep 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works with 3.6.8 after some minor modifications. Excellent hack! Cheers.
Reply With Quote
Reply


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:35 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.04693 seconds
  • Memory Usage 2,300KB
  • 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
  • (2)bbcode_code
  • (1)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