Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Latest Photopost Photo In Postbit Details »»
Latest Photopost Photo In Postbit
Version: 1.00, by sabret00the sabret00the is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 11-29-2004 Last Update: Never Installs: 4
 
No support by the author.

Ok so i'm in the middle of developing something cool and it seems that a few people actually only want half of what i'm attempting to do so for you all here you go. Peace, Love and Happiness!

Damn almost forgot the desciption, erm this hack puts a photo, but not just any photo, your last uploaded photo into your postbit, it's s3x11111!!!!! i think .

Ok theirs one question i don't ever ever ever want to see in this thread, unless you're sure you have www.photopost.com's photopost installed, save us all the heartache and just don't do it, be kind, be generous, show me love, but if you aint got photopost installed then what's the point in saying "it don't show the photo for me" it's bound not to oh and for people who are going to ask "can you do it for the vB photo" nope i'm afraid i've never tried

ok after that little bit i should say something cool, like screenshots are not present since i have no desire to install this as is, no wait that sucked, however if anyone would like to provide screenies, you're welcome yay.

Damn is their nothing else i can waste your time with, surely you have no better to do than read my garbage, guess not, oh well it's an easy installation, i estimates 3.75 minutes, 2 files edits, one template mod, 1 vB option group and a setting to fill it.

[high]big thanks to natch without him it would've been impossible and thanks to dean c (mist) too who got me through the final stages like a lucazade during a marathon.[/high]

[high] * sabret00the does cool guy pose[/high]

have fun with it.

Query Load: beleive it or not, from the dungeon of super sucky coders this came and only adds one query to the showthread, i'm not even lying, wow, well that's what the microstats said, so if i was wrong blame Neo, he's obviously misalligned the matrix.

think i covered everything now

in your includes/functions_showthread.php find
PHP Code:
// ###################### Start process_highlight_postbit #######################
       
function process_highlight_postbit($text$words$prepend
above that add
PHP Code:
// ###################### Start last photopost photo #######################
       
function fetch_galleryavatarcache()
       {
           global 
$DB_site$galleryavatarcache;
           if (!
is_array($galleryavatarcache))
           {
               
$galleryavatarcache = array();
               
$allgalleryavatars $DB_site->query("
          SELECT pp_photos.id, pp_photos.title, user.userid, pp_photos.cat, pp_photos.approved, pp_photos.bigimage
                   FROM ppost_photos AS pp_photos
             LEFT JOIN " 
TABLE_PREFIX ."user AS user ON pp_photos.userid = user.userid
               "
);
       
               while(
$galleryavatararray $DB_site->fetch_array($allgalleryavatars))
               {
            
$galleryavatarcache["$galleryavatararray[userid]"] = $galleryavatararray;
               }
       
               
$DB_site->free_result($allgalleryavatars);
           }
       }
       
       function 
fetch_cachedgalleryavatar_url($userid)
       {
           global 
$galleryavatarcache$vboptions$stylevar;
           if(!
is_array($galleryavatarcache))
           {
               
fetch_galleryavatarcache();
           }
           if(
$galleryavatarinfo $galleryavatarcache[$userid])
           {
               if (
$galleryavatarinfo[bigimage] && $galleryavatarinfo[cat])
               {
          return 
"$vboptions[galleryurl]/data/$galleryavatarinfo[cat]/{$userid}".substr($galleryavatarinfo[bigimage], 0, -4)."-thumb.".file_extension($galleryavatarinfo[bigimage]);
               }
               else
               {
                   return 
"$stylevar[imgdir_misc]/noavatar.gif";
               }
           }
           return 
FALSE;
       } 
now in your showthread.php find
PHP Code:
        $post['musername'] = fetch_musername($post);
               
$post['islastshown'] = ($post['postid'] == $lastpostid);
               
$post['attachments'] = &$postattach["$post[postid]"]; 
and directly below that add:
PHP Code:
        $post['galleryavatar'] = fetch_cachedgalleryavatar_url($post[userid]); 
now chuck your board into debug mode and add this setting group:
Code:
vaname: photopost
       title: Photopost
       vB default: no
now add to that group this option
Code:
       varname: galleryurl
       title: Gallery URL
       Description: this is the location to your photopost installation (no trailing backslash)
       Option: [leave this blank]
       Default: http://www.domainname.com/directory
       vB default: no
now in your postbit template, whereever you want it add
HTML Code:
<if condition="$post[galleryavatar]"><a href="$vboption[galleryurl]/showgallery.php?cat=500&ppuser=$post[userid]"><img src="$post[galleryavatar]" border="0" alt="$post[username]'s latest photo" /></a></if>

Show Your Support

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

Comments
  #22  
Old 12-01-2004, 02:56 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #23  
Old 12-01-2004, 03:51 PM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh please make a recent photos in Forumhome hack
Reply With Quote
  #24  
Old 12-01-2004, 04:11 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i already got that, but i got it from www.photopostdev.com and just converted it to vBulletin.
Reply With Quote
  #25  
Old 12-01-2004, 10:24 PM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MPDev
Actually, if they are in seperate databases, as long as they share a common userid/password for access, you could just use the query:

SELECT pp_photos.id, pp_photos.title, user.userid, pp_photos.cat, pp_photos.approved, pp_photos.bigimage
FROM ppost_photos AS pp_photos
LEFT JOIN " . TABLE_PREFIX ."user AS user ON pp_photos.userid = user.userid

and add in a tablename before the ppost_photos like:

photopostdb.ppost_photos

Then it would pull it from the other database without having to switch or combine dbs.
woot thx!

will play around with this later
Reply With Quote
  #26  
Old 12-02-2004, 12:34 AM
SVTBlackLight01's Avatar
SVTBlackLight01 SVTBlackLight01 is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MPDev
Actually, if they are in seperate databases, as long as they share a common userid/password for access, you could just use the query:

SELECT pp_photos.id, pp_photos.title, user.userid, pp_photos.cat, pp_photos.approved, pp_photos.bigimage
FROM ppost_photos AS pp_photos
LEFT JOIN " . TABLE_PREFIX ."user AS user ON pp_photos.userid = user.userid

and add in a tablename before the ppost_photos like:

photopostdb.ppost_photos

Then it would pull it from the other database without having to switch or combine dbs.
Thanks for the tip. I got it working, but for some reason the image is broken for just one member (that I have been able to see so far). The path isn't correct. It should be http://www.modernengineuity.com/gallery/data/500/468108_0841-thumb.JPG, but it's trying to find it in http://www.modernengineuity.com/gallery/data/503/468108_0841-thumb.JPG

Any ideas?
Reply With Quote
  #27  
Old 12-02-2004, 04:57 AM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work sabret00the . Do you have any plans to release a vBadvanced CMPS module to show the last photo on the homepage? I think a lot of people would be interested in that.
Reply With Quote
  #28  
Old 12-02-2004, 10:17 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Intex
Nice work sabret00the . Do you have any plans to release a vBadvanced CMPS module to show the last photo on the homepage? I think a lot of people would be interested in that.
i don't use vBaCMPS but i think it's already been done anyway
Reply With Quote
  #29  
Old 12-02-2004, 10:18 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SVTBlackLight01
Thanks for the tip. I got it working, but for some reason the image is broken for just one member (that I have been able to see so far). The path isn't correct. It should be http://www.modernengineuity.com/gallery/data/500/468108_0841-thumb.JPG, but it's trying to find it in http://www.modernengineuity.com/gallery/data/503/468108_0841-thumb.JPG

Any ideas?
i haven't got a clue, i can only recommend checking the database and seeing what the catid is for that user for the latest piccie.
Reply With Quote
  #30  
Old 12-02-2004, 10:50 AM
dutchbb dutchbb is offline
 
Join Date: Nov 2003
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this could be good, if members have the option to turn it off. I would also like it to be set off by default and only show avatar OR PP pic, not both.
Reply With Quote
  #31  
Old 12-02-2004, 10:55 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Triple_T
this could be good, if members have the option to turn it off. I would also like it to be set off by default and only show avatar OR PP pic, not both.
that's exactly what i want from this, however i just gotta get to grips with the useroptions and usergroup settings.
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 08:03 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.04778 seconds
  • Memory Usage 2,337KB
  • 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_html
  • (4)bbcode_php
  • (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
  • (4)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