The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
anonymous mod
Hello,
I just made a custom mod inspired from https://vborg.vbsupport.ru/showthread.php?t=177694 but facing few minor problems with this. Code:
$template_hook['newthread_start'] = 'Post Anonymous: <input type="checkbox" name="anonymous" value="1" tabindex="1" title="Post Anonymous">'; now the main thing: I need to write a IF clause where i need to see If the check box is checked then it must show ANONYMOUS (That is it should Hide the USER Details)... ELSE show the username like a regular Post. Code:
if (anonymous == "1") { $template_hook['postbit'] = '<center><span class="username guest"><b>Anonymous</b></span><img src="images/anon.gif" /></center>'; }else { $template_hook['postbit'] = 'test'; } Is there someone who can help me with complete this mod? |
#2
|
|||
|
|||
I'm not sure, but you could try this:
Code:
global $vbulletin; $vbulletin->input->clean_gpc('r', 'anonymous', TYPE_INT); if ($vbulletin->GPC['anonymous'] == 1) { $template_hook['postbit'] = '<center><span class="username guest"><b>Anonymous</b></span><img src="images/anon.gif" /></center>'; }else { $template_hook['postbit'] = 'test'; } |
#3
|
|||
|
|||
Let me begin by thanking you for your reply....but uinfortunately it didnt help,,
Any more ideas........?? I think it has something to do with inserting the value 1 to the data base colum where this values are saved and the function is triggered i want a query or code which inserts a value when the USER selects the CHECK BOX before clicking SUBMIT button |
#4
|
|||
|
|||
Oh, right. I didn't really look at the mod, I just took a guess. But I think you're right, you would need to save that value with the post, maybe by making a new column called anonymous in the post table. If you did that then you should be able to use $post['anonymous'] in your 'if'.
Edit: I haven't thought about it a lot, but maybe another approach to anonymous posting is to set the userid to 0 (like for guests or deleted users), then set the username to Anonymous. Of course if you did that, the user who wrote it wouldn't be able to edit or delete it (and I guess you'd have no record of who wrote it, so maybe it's not such a good idea). |
#5
|
|||
|
|||
Quote:
o indicating REGULAR post 1 Indicating ANONYMOUS post Kindly some one help me in this regard. --------------- Added [DATE]1359044891[/DATE] at [TIME]1359044891[/TIME] --------------- thanks for all the support mine mod is done and its works perfect |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|