vBulletin Modifications

Need advice for radio buttons

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 02-03-2006, 04:19 PM   #1
Junior Member
Join Date: Feb 2006
Location: Eastern Ontario, Canada
Bryan Ex is on a distinguished road

Default Need advice for radio buttons

I have an older version of Ryangel's Journal hack installed on my board and with a bunch of fussing and some help from experiened coders have things working quite nicely... except for one small glitch. If a member edits a journal entry it defaults to public status rather than what it was set to originally. 95% of the time this isn't an issue as most journals are public but the other 5% that were intended to be private have caused embarrassement to their owners when they didn't notice the setting changed back to public when they edited it. What I need is for the radio buttons for "Public" & "Private" to select whatever was already set in the database originally. The journals table has a field called "private" with either a 0 or 1 to denote the entry's status. Looking through ther php file I found the folowing queries which don't seem to be complete for status;

You must first be a registered member to view any code.
Then in the VB journal template "Public" is marked as checked="checked";

You must first be a registered member to view any code.
What I'm after here is for "checked" to = what the person selected in the first place. Any guidance on this would be much appreciated.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 02-05-2006, 02:51 AM   #2
Coder
Join Date: Jun 2005
harmor is on a distinguished road

Default

I'll download it and take a look.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-05-2006, 04:52 PM   #3
Coder
Join Date: Jun 2005
harmor is on a distinguished road

Default

I downloaded the Journal hack and I cannot find those radio buttons




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-06-2006, 10:18 AM   #4
Junior Member
Join Date: Feb 2006
Location: Eastern Ontario, Canada
Bryan Ex is on a distinguished road

Default

Awww nuts! The hack must have been revised far more than I had expected since I first installed it. Either way it seems I've got it sorted. It took me longer than I had hoped to figure it out and have no idea if it's "technically" correct but it's working. I added the following to the journal script;

Quote:
$status = $journal["private"];
$checked = '';
$checked2 = '';
if ($status == 0)
{
$checked = HTML_CHECKED;
}
else if ($status == 1)

{
$checked2 = HTML_CHECKED;
}
...then dropped $checked and $checked2 into either button option in the template. Appreciated the effort all the same harmor!




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-06-2006, 10:32 AM   #5
Coder
Join Date: Jun 2005
harmor is on a distinguished road

Default

I downloaded the hack and couldn't find the radio buttons.

I was going to do the same but different.

You must first be a registered member to view any code.
Our codes are very similiar.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete buttons forum wysiwyg editor VB 3.5.3 stivo General vBulletin Support 4 03-19-2006 04:45 AM


All times are GMT -3. The time now is 01:00 AM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)