Harlequin
10-01-2003, 12:48 PM
In the vBJournal Lite addon, I'm attempting to use a profile field to load a user-specified header. If I can just get the MySQL backend of this working, I can handle the rest with rainbow colors -- but I've never done anything like this before.
Basically, I've taken homepage from the 'user' table and copied it to a tee, using the same update information, but renaming everything to from 'homepage' to 'blogtop'.
I added this to the db:
ALTER TABLE user ADD blogtop VARCHAR (255) NOT NULL;
And when I added the information to the blog header profile input field, I reloaded the edit profile page and everything saved great!
And my code is as follows in journal.php (of the vBJournal Lite addon (before the call of the journal_view template)):
// Display Blog Header
$userinfo=$DB_site->query_first(" SELECT blogtop
FROM user
WHERE userid='$bbuserinfo[userid]'
");
$userinfo[blogtop] = $bloghead;
My output is zilch, nothing - it displays jack where $bloghead is used in the journal_view template.
Shouldn't $bloghead in the template display the info from the database correctly or am I doing something really wrong? Or better yet, is something else really wrong that I've tried doing?
My desired output is real simple methinks -- if the user inputs 'abc123', I want it to display 'abc123' in the view journal section, no eval to a template or anything.
I've contacted PixelFX and Anime-loo about this, too. Pixel says he'll see what he can do whenever he has some free time and Anime has yet to respond, but Pixel did recommend I try to post this in the forums. And so I am again. ;)
Basically, I've taken homepage from the 'user' table and copied it to a tee, using the same update information, but renaming everything to from 'homepage' to 'blogtop'.
I added this to the db:
ALTER TABLE user ADD blogtop VARCHAR (255) NOT NULL;
And when I added the information to the blog header profile input field, I reloaded the edit profile page and everything saved great!
And my code is as follows in journal.php (of the vBJournal Lite addon (before the call of the journal_view template)):
// Display Blog Header
$userinfo=$DB_site->query_first(" SELECT blogtop
FROM user
WHERE userid='$bbuserinfo[userid]'
");
$userinfo[blogtop] = $bloghead;
My output is zilch, nothing - it displays jack where $bloghead is used in the journal_view template.
Shouldn't $bloghead in the template display the info from the database correctly or am I doing something really wrong? Or better yet, is something else really wrong that I've tried doing?
My desired output is real simple methinks -- if the user inputs 'abc123', I want it to display 'abc123' in the view journal section, no eval to a template or anything.
I've contacted PixelFX and Anime-loo about this, too. Pixel says he'll see what he can do whenever he has some free time and Anime has yet to respond, but Pixel did recommend I try to post this in the forums. And so I am again. ;)