Version: 1.00, by sabret00the
Developer Last Online: Apr 2010
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 ");
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
Sounds like a great hack, screenshots would be nice.
I plan to use it with classified post instead, putting the members last ad in their post, linking to their personal ads. (only for upgraded members tho hehe)
If anyone knows how to get this working on a seperate db, please post up. I'm sure it can't be too rough. I'd be willing to spend some time on it, but I'm no programer.
in all honesty i wrote it into the thread on the fly, it'd be just as much effort for me to make it as it would be for you to copy and paste it, but alas, i'll see what i can do this afternoon
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.