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

Reply
 
Thread Tools
Add a link to a user's Photopost Gallery Details »»
Add a link to a user's Photopost Gallery
Version: 0.75, by iRO Wiki iRO Wiki is offline
Developer Last Online: Feb 2014 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.6.8 Rating:
Released: 01-31-2008 Last Update: 02-21-2008 Installs: 21
DB Changes Template Edits
Re-useable Code Additional Files  
No support by the author.

Edit: I no longer use photopost, so this mod is no longer supported!


After noticing a few people wanting a working version of this, I decided to release what I did to make it work! This is the first time I've done anything like this, go easy on me.

This Mod helps "advertise" your PhotoPost gallery on your forums. It will allow you to place "View Gallery" links into the postbit_legacy, the dropdown menu when you click a user's name, and on your profile page. The postbit links will only appear when people actually have photos uploaded. The profile page will display the number of photos uploaded (you could put that on the postbit as well with some code changes).

This is similar to several different mods already out there, except this has been tweaked and confirmed to work on 3.6.8.

The Mod is made up of template changes and a cron script upload. The cron script is designed for the case of the VB and PP databases being seperate, but should work if they are in the same database, just edit the proper fields.

This mod also assumes you are not using search engine friendly URL's. If you are, you can edit the code to reflect it.


Before doing ANYTHING backup your database, I'm not responsible for data loss!

Step One

Using Execute SQL Query in the ACP, run the following as a manual query, making sure to adjust for your table prefix and rename the field if needed:

Code:
ALTER TABLE `vb_user` ADD `photos` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'

Step Two

Download the attached gallery.php and edit it to reflect your database details and table prefixes.

Step Three

Upload the edited gallery.php to your /includes/cron/ folder.

Step Four

Create a new scheduled task in your ACP:

Varname: gallery_check
Title: Gallery Check
Description: Updates the photo field in vb_users
Day of week: *
Day of month: *
Hour: *
Minute: 1 16 31 46 - -
Active: Yes
Log Entries: No
Filename: ./includes/cron/gallery.php
Product: vBulletin
vBulletin Default: No

Step Five

Add a new phrase:

Phrase Type: GLOBAL
Product: vBulletin
Varname: pp_gallery
Text: Gallery

Step Six

Template edits! First off, the profile page.

Edit MEMBERINFO and insert the following code wherever you would like it, AFTER editing the URL to match your site. I placed mine inbetween Posts and Referrals.

Code:
<fieldset class="fieldset">
                <legend>$vbphrase[pp_gallery]</legend>
                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                <tr>
                    <td>
                        Images: <strong>$post[photos]</strong><br> <a href="http://yoursitegoeshere.com/showgallery.php?cat=500&amp;ppuser=$post[userid]">View $userinfo[username]'s Gallery</a>
                    </td>
                </tr>
                </table>
            </fieldset>
Edit postbit_legacy (not sure if the same code works or not in postbit).

This is the code for the dropdown menu:

Code:
<if condition="$post['photos']">
<tr><td class="vbmenu_option"><a href="http://yoursitegoeshere.com/showgallery.php?cat=500&ppuser=$post[userid]">View $post[username]'s Photo Gallery </a></td></tr>
</if>
This is the code for "View Gallery" link in the postbit_legacy:

Code:
<if condition="$post['photos']"><div><a href="http://yoursitegoeshere.com/showgallery.php?cat=500&amp;ppuser=$post[userid]">View Gallery</a></div><br></if>

After all that, you should be set.


Changelog:

.5 - First Release
.75 - Fixed issue with "logging" line and the cron not properly updating vb's user table when the user no longer had photos

Show Your Support

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

Comments
  #22  
Old 06-09-2008, 06:43 PM
iRO Wiki iRO Wiki is offline
 
Join Date: Sep 2007
Location: Colorado
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah sorry, I had to forsake online life for RL the past month due to issues, I'll get to your issue asap!
Reply With Quote
  #23  
Old 07-04-2008, 01:00 PM
htscpl's Avatar
htscpl htscpl is offline
 
Join Date: Sep 2003
Location: Houston
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod but to get the link to work in the profile block I had to change the $post[userid] to $userinfo[userid]

Code:
<fieldset class="fieldset">
                <legend>$vbphrase[pp_gallery]</legend>
                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                <tr>
                    <td>
                        Images: <strong>$post[photos]</strong><br> <a href="http://yoursitegoeshere.com/showgallery.php?cat=500&amp;ppuser=$userinfo[userid]">View $userinfo[username]'s Gallery</a>
                    </td>
                </tr>
                </table>
            </fieldset>
Reply With Quote
  #24  
Old 07-21-2008, 06:12 PM
littleginsu littleginsu is offline
 
Join Date: Mar 2008
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got it to work in the user's profile and the pop-up menu.. anyone know where the link needs to be added in order to show up in the user info which is in their replies (I am using vBulletin 3.7)
Reply With Quote
  #25  
Old 10-11-2008, 09:58 PM
LoriW LoriW is offline
 
Join Date: Jun 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe I have this right but when I click the link to view the gallery I get a 404 error page -

HTML Code:
The requested URL /showgallery.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
What could be causing this?
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 05:01 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06555 seconds
  • Memory Usage 2,247KB
  • Queries Executed 21 (?)
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
  • (5)bbcode_code
  • (1)bbcode_html
  • (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
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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