PDA

View Full Version : Show Thread Enhancements - Hide Signature and Avatar in specific forum


ArbStar
15 Feb 2009, 19:12
Hello everybody,

This is my first modification I post in vBulletin.org, and I hope it will be a good start for me and I keep posting new modifications for you.

Today's post is about hiding signature or/and avatars in threads in specific forum, its very easy and simple.


Hiding signaturesFirst, open your postbit, or postbit_legacy template.


Find:

<if condition="$post['signature']">


Replace it with:

<if condition="$post['signature'] AND !in_array($thread['forumid'],array(2,47))">

IMPORTANT NOTICE: Replace 2 & 47 with the forum id you want to hide signatures from it, if you want to add more forum numbers add comma between them.

You're done ! :D



Hiding AvatarsNow we will do the same thing with avatars, its also easy like the signature hiding.
Open your postbit, or postbit_legacy template.


Find:

<if condition="$show['avatar']">


Replace it with:

<if condition="$show['avatar'] AND !in_array($thread['forumid'],array(2,47))">
IMPORTANT NOTICE: Replace 2 & 47 with the forum id you want to hide avatars from it, if you want to add more forum numbers add comma between them.



I hope this modification would be useful for everyone.


Regards,
Ibrahim Mohammed

Diana Notacat
16 Feb 2009, 22:28
Wonderfully useful!

I'm using this (http://www.vbulletin.org/forum/showpost.php?p=1620299&postcount=5) if you want to exclude avatars and siggies in multiple forums.

ArbStar
17 Feb 2009, 11:29
Wonderfully useful!

I'm using this (http://www.vbulletin.org/forum/showpost.php?p=1620299&postcount=5) if you want to exclude avatars and siggies in multiple forums.
ThnX for ur reply & Installation

Jasem
04 Apr 2009, 16:28
great work, thank you!

Installed

tafreeh
10 Apr 2009, 02:12
if we want to hide sigg in multiple forums... can we just add comma and put next forum id? would that work?
coz when i try to add, multiple forums. i get this error
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ',' in /8888/8888/888888/includes/adminfunctions_template.php(3939) : eval()'d code on line 167

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

this is my code

<if condition="$post['signature'] AND $thread['forumid'] != 231, 257, 331, 348, 349, 355, 258, 471, 282">
<!-- sig -->

down.low
11 Apr 2009, 04:39
any way to change this to hide the member names as well?

TheLastSuperman
11 Apr 2009, 04:49
any way to change this to hide the member names as well?

Yes, find (Or Similar):

<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>

Replace with:

<if condition="$show['profile']" AND $thread['forumid'] != 2">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>

Now don't forget to follow this mod authors directions regarding the forum ID.

that should do it as when I removed that code the names were gone from my forums. I did not trick it via the forum id I simplt removed, saved, viewed, then corrected it back to original.

S-MAN

TheLastSuperman
11 Apr 2009, 04:52
if we want to hide sigg in multiple forums... can we just add comma and put next forum id? would that work?
coz when i try to add, multiple forums. i get this error
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ',' in /8888/8888/888888/includes/adminfunctions_template.php(3939) : eval()'d code on line 167

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

this is my code

<if condition="$post['signature'] AND $thread['forumid'] != 231, 257, 331, 348, 349, 355, 258, 471, 282">
<!-- sig -->

Take out all the extra spaces and try it ;)


<if condition="$post['signature'] AND $thread['forumid'] != 231,257,331, 348,349,355, 258,471,282">
<!-- sig -->

Let us all know if it worked, not tested but it should as I believe it was not reading the code correctly due to all the extra spaces but then again it could be due to the AND and it only NEEDING one forum ID to work with the first part of the IF i.e. the if condition equals to post signature ;)

S-MAN

q8manar
18 Apr 2009, 11:42
Take out all the extra spaces and try it ;)


<if condition="$post['signature'] AND $thread['forumid'] != 231,257,331, 348,349,355, 258,471,282">
<!-- sig -->

Let us all know if it worked, not tested but it should as I believe it was not reading the code correctly due to all the extra spaces but then again it could be due to the AND and it only NEEDING one forum ID to work with the first part of the IF i.e. the if condition equals to post signature ;)

S-MAN


this is not working

this is working good
:
<if condition="$show['avatar'] AND ($thread['forumid'] != 3 and $thread['forumid'] != 58 and $thread['forumid'] != 34 )">

trotskid
29 Apr 2009, 14:13
this is not working

this is working good
:
<if condition="$show['avatar'] AND ($thread['forumid'] != 3 and $thread['forumid'] != 58 and $thread['forumid'] != 34 )">

Interesting addon for some forums (private mainly or closed), but doesnīt work with multiple forums on postbit template with v3.8.2 :/

down.low
09 May 2009, 22:23
Yes, find (Or Similar):

<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>Replace with:

<if condition="$show['profile']" AND $thread['forumid'] != 2">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>Now don't forget to follow this mod authors directions regarding the forum ID.

that should do it as when I removed that code the names were gone from my forums. I did not trick it via the forum id I simplt removed, saved, viewed, then corrected it back to original.

S-MANThanks for the help- It didn't work quite right for me but I ended up figuring something else out for my problems.





I need help from someone on 2 last issues-

Removing the "last post" user name (or even the column)
Removing the "user name" for the thread starter.

https://www.vbulletin.org/forum/

IF someone could help me out in any kind of way it would be greatly appreciated.

down.low
09 May 2009, 22:35
this is not working

this is working good
:
<if condition="$show['avatar'] AND ($thread['forumid'] != 3 and $thread['forumid'] != 58 and $thread['forumid'] != 34 )">



Use it as this: (there was to many spaces in the previous example):

<if condition="$post['signature'] AND $thread['forumid'] != x,x,x,x,x">


Another route at the problem/s:

<if condition="in_array($forum[forumid], array(x,x,x,x,x))">

Something you want to hide

</if>Any forum id not listing here (The x's need to be replaced)- would not see something in particular.

nomoreturn
09 May 2009, 23:22
Not working even in single forum in 3.8.2

down.low
10 May 2009, 04:07
http://i472.photobucket.com/albums/rr88/ps_auction/help.jpg


Could someone help me with:

Removing the "last post" user name (or even the column)
Removing the "user name" for the thread starter.

Could someone point me in a direction- it would be really helpful.

trotskid
10 May 2009, 12:48
Use it as this: (there was to many spaces in the previous example):

<if condition="$post['signature'] AND $thread['forumid'] != x,x,x,x,x">


Another route at the problem/s:

<if condition="in_array($forum[forumid], array(x,x,x,x,x))">

Something you want to hide

</if>Any forum id not listing here (The x's need to be replaced)- would not see something in particular.

For the first code appears this error:

Parse error: syntax error, unexpected ',' in /var/www/vhosts/"my forum"/httpdocs/foros/includes/adminfunctions_template.php(3939) : eval()'d code on line 163

For the second code I donīt understand what it means Something you want to hide

Regards

down.low
11 May 2009, 05:54
For the first code appears this error:

Parse error: syntax error, unexpected ',' in /var/www/vhosts/"my forum"/httpdocs/foros/includes/adminfunctions_template.php(3939) : eval()'d code on line 163

For the second code I donīt understand what it means Something you want to hideRegards

The error I don't know--

For the second code I'll explain:

Example- you wanted to hide your user name and user title in a specific forum- but not all forums.

You would open up you postbit_legacy and find the following (or similar):

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont" align="center">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>Then before it you would add:
<if condition="in_array($forum[forumid], array(42,26,25,9,8))">The forums with an Id of 42,26,25,9,8 would see their user names & titles but anything not listed in the array()) would not...

Then After it you would add:
</if>
I've done this in a whole sub-forum removing: (making it a anonymous sub-forum)

User Name
User Title
Post Count (if you know what you're doing you can pull a username off of the postcount # alone)
Location
Msn/yahoo/skype
Reputation
Add Rep
Infractions
Quote
Thanks
Signatures
Avatars


(Side Note: I'm running Vbulletin 3.8.1 pl1)

creative-friend
22 Jul 2009, 14:23
how can i hide signature in more than 1 forum....i have tried but giving me error..

alloutvb
23 Jul 2009, 15:33
is there a way to have this for a user to turn on and off for the hole board like is a user is on a iphone or on 56k so the site loads faster ? please let me know thanks for this mod

apiasto
27 Jul 2009, 12:12
its not working on multiple forums

ArbStar
28 Jul 2009, 12:20
For the first code appears this error:

Parse error: syntax error, unexpected ',' in /var/www/vhosts/"my forum"/httpdocs/foros/includes/adminfunctions_template.php(3939) : eval()'d code on line 163

For the second code I donīt understand what it means Something you want to hide

Regards
You should put ( ! ) Before ( in_array(); ) ;)

trotskid
03 Aug 2009, 04:01
<if condition="$post['signature'] AND !in_array($thread['forumid'],array(2,47))">

Now works PERFECT on multiple forums! :up:

Many thanks ;)

Feanor_87
05 Aug 2009, 08:57
Very useful, thanks!! :)

Bolthaven
07 Aug 2009, 04:29
How would I hide this for unregistered users? What I want to do is hide avatar, signature, and membernames from unregistered users while still letting them view some thread content.

My guess is that I would replace the condition !in_array($thread['forumid'],array(2,47)) with in_array(*whatever variable for group membership*)

love.
08 Aug 2009, 16:18
thank u

Phaedrus
09 Aug 2009, 23:26
is there a way to have this for a user to turn on and off for the hole board like is a user is on a iphone or on 56k so the site loads faster ? please let me know thanks for this mod

User CP, three checkmark boxes in the User Options allow a user to choose to do this for the whole board.

alloutvb
11 Aug 2009, 04:36
k thanks for the help just must have over looked it

ArbStar
03 Sep 2009, 12:08
How would I hide this for unregistered users? What I want to do is hide avatar, signature, and membernames from unregistered users while still letting them view some thread content.

My guess is that I would replace the condition !in_array($thread['forumid'],array(2,47)) with in_array(*whatever variable for group membership*)

If you want to show something only to members, use this code:


<if condition="$show['member']">
Some thing you want to hide from guests
</if>




and if you have many user groups that you want to hide from them, use this one:


<if condition="!is_member_of($vbulletin->userinfo, array('1','2','3'))">
Some thing you want to hide from some groups
</if>

Note: Replace 1,2,3 with the groups you want to hide a content from them:)

ArbStar
03 Sep 2009, 12:12
how can i hide signature in more than 1 forum....i have tried but giving me error..

Please use the new code in the thread, I've updated it :)

is there a way to have this for a user to turn on and off for the hole board like is a user is on a iphone or on 56k so the site loads faster ? please let me know thanks for this mod

You can make additional user profile fields from the ACP,
and then use this code:


<if condition="$member['field6']=='show'">
$post['signature'];
</if>


Note: Replace field6 with the field name/number that will appear in the ACP after adding it.

Alucard^
25 Oct 2009, 03:26
Good, i like this... installed.

Also, I added an "else":

<if condition="$post['signature'] AND !in_array($thread['forumid'],array(97))">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->

<else />

<!-- sig -->
<div>
__________________<br />
In this subforum the signatures are disabled.
</div>
<!-- / sig -->

</if>

Work perfect but I am noob in PHP, so I don't know... maybe the code can be more optimized?

gbechtel
19 Nov 2009, 17:24
Just an FYI

I did not want to display signatures or avatars to unregistered users, but there are also three forums that I did not want them to display to members. so I used the following...

In case anyone was looking to do the same...


<if condition="$post['signature'] AND $show['member'] AND !in_array($thread['forumid'],array(36,107,108))">

HIDE THIS

</if>

Pakblogger
18 Jul 2010, 14:39
not working in VB 3.8.6 any idea?

oldengine
25 Jul 2010, 06:22
Hide Signature and Avatar in specific forums

Great idea, but this thread has turned into chaos and confusion. :mad:

Edit: ----

Actually, the mod works excellently! Version 3.8.6 PL1

Thank you ArbStar! :up: Marks Installed!

Harley D
19 Aug 2010, 15:01
Thanks everyone, I finally got this to work.

creative-friend
27 Jan 2011, 19:59
How can i do this in VB4??

Phaedrus
01 Mar 2011, 01:06
Does this work in 4.x?

ArbStar
01 Mar 2011, 01:18
Does this work in 4.x?
I'm not sure tbh, haven't tried it.
You could use the same concept but edit the codes to match with VB4 codes format.

letsjoy
16 Aug 2011, 02:36
I'm not sure tbh, haven't tried it.
You could use the same concept but edit the codes to match with VB4 codes format.

ArbStar, please make it work for vB 4.x

Thanks in Advance :-)