an update!
i'm running a nightly build (from June 2nd) w/ core: 0.9.22
this includes the new url rewrite module - which works!
i had to hardcode some links though as the gallery url rewrite takes over the vB relative links.
so i had to make the relative links 'static' in 1 template and hard code a phrase too...
the phrase i had to edit was:
private_messages_nav
from:
Code:
<a href="private.php?{3}">Private Messages</a>: {1}, {2}.
to:
Code:
<a href="http://www.domain.com/private.php?{3}">Private Messages</a>: {1}, {2}.
the template i had to edit was: navbar
and i changed all links that looked like:
Code:
<a href="profile.php?$session[sessionurl]do=editprofile">
to:
Code:
<a href="$vboptions[bburl]/profile.php?$session[sessionurl]do=editprofile">
basically added:
in front of all of the links in that page that actually go somewhere. (not the # links) there's like 20 of 'em.
you can also do random blocks and such. i'm not sure the cleanest way to do it... i've done it on our site, but it uses vbadvanced. basically, look in the gallery site admin under:
Blocks -> Random/Popular
and note the 'External Image Block' section.
at some point in yer code, you need to call a php variable to get yer random block. since we cannot do this directly from templates, we have to do it in one of the .php files and then reference the variable which introduces a level of difficulty. for instance, as that page indicates, the code:
Code:
<?php @readfile('http://www.cvreefers.org/gallery2.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=owner'); ?>
will generate a random image. as you cannot call php from our templates, i kinda kludged this together w/ vbadvanced's help.
you can then get real jiggy w/ it by calling those links in yer postbit (or postbit_legacy in our case) to produce things like each users latest album or each users random pic.
an example is here, note beneath the posters' avatar:
http://www.cvreefers.org/showthread.php?t=2614
however, each time u look up a random pic, i get a delay on a p4 3.06 w/ 1 gig of ram. so if u have 10 users browsing 17 posts w/ 10 random pic genreators at once... well... u get the idea. actually read that thread if you want to see the outcome...
so - i'm using a cron job and a hidden field to do the tricks on that page.
i hesitate to mention those above tricks because i know the first thing that's going to be asked is 'how did you do this?' and it's pretty entailed. to get the user's gallery links beneath each user involves naming an album identicle to that user, creating two hidden user profile fields, and setting up a cron job. for the daily random block, another hidden user profile field, and another cron job. i really doubt that i'm doing it 'the right way' nor the most eloquant nor the most effecient way. heck, i'm establishing my own mysql connection on those cron jobs and i'm sure i could mooch off of vB's connection if i researched how, heh! so i just wanted to show that it
can be done if that makes sence! i'm sure someone more advanced then i could make it generically fit any vB install.