Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 10 Mar 2020, 08:11
Zweeper Zweeper is offline
 
Join Date: Jan 2005
Hide [code] content from guests

Hey, I was using this template modification to hide [code] content from guests:
https://www.vbulletin.org/forum/showthread.php?p=2602245


unfortunately it is suddenly not working anymore with 5.6.0 (didnt do any changes, just the update).



Can anybody help me to modify the code in a way, so that it is working again?





I was using this code before:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The problem seems to be a trouble with the group parts. When I enter the group for guests, it shows the content to everybody (of course). If I enter the groups for registered users, admins and mods, it is hidden from everybody.


Would appreciate any help!




Greetings!

--------------- Added 10 Mar 2020 at 19:42 ---------------

It only works if I add usergroup "1" to the code (guests). Then its shown to all.
Otherwise its hidden for all. Strange...
Reply With Quote
  #2  
Old 10 Mar 2020, 21:34
shka shka is offline
 
Join Date: Mar 2016
I dont know if it is an error or a feature. Add debugvardump (! in test environment)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Test in 5.5.3:
You get the vardump of the current logged in user (and also null info of not logged in) - and only then your bbcode_code makes sense

Test in fresh 5.6.0 with first post by admin and answer by registered user
In all situations (admin logged in, reg user logged in, no one logged in) I see in first post "admin-user-object" and in second post "reg-user-object".

So error in 5.6.0 or you have to use another object.
Reply With Quote
  #3  
Old 11 Mar 2020, 05:08
Zweeper Zweeper is offline
 
Join Date: Jan 2005
Many thanks for your help so far.

I am also discussing this on vbulletin.com because I couldn't solve it on my own so far.

https://forum.vbulletin.com/forum/vb...nt-from-guests
Reply With Quote
  #4  
Old 11 Mar 2020, 18:52
shka shka is offline
 
Join Date: Mar 2016
Versuche mal /Try


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Da ich auch auf vB.com mitgelesen habe und Risiko nicht einschätzen kann - $currentUser enthält die gleichen Infos wie $user (nur protected), könnte man ja am Ende vom Template die Variable $currentUser wieder unsetten. Das müsste aber jemand Profunderer entscheiden.
Reply With Quote
  #5  
Old 11 Mar 2020, 19:08
Zweeper Zweeper is offline
 
Join Date: Jan 2005
Hey, danke für das Update, aber da tut sich leider auch nichts. Führt zum gleichen Ergebnis dass entweder allen Usern der Code verwährt wird, oder eben allen angezeigt wird. Schade, aber trotzdem danke!
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Thread Enhancements MARCO1 Hide Thread Content - With excluding forum to hide content MARCO1 vBulletin 4.x Add-ons 81 06 Jun 2018 21:15
Show Thread Enhancements MARCO1 Hide Thread Content - With excluding forum to hide content MARCO1 vBulletin 3.8 Add-ons 14 03 Aug 2014 14:38



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


New To Site? Need Help?

All times are GMT. The time now is 11:32.

Layout Options | Width: Wide Color: