vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=328306

Yilmaz - Hide [code,php,html] content from guests (vb5.6.x)
by yilmaz
27 Oct 2020 13:51

3 Attachment(s)
Tested in vbulletin version 5.6.4 works fine

Features:
This mod makes it so you can hide [CODE] [PHP] [HTML] BBcode content from guests
Hide [CODE], [HTML] ve [PHP] from Unregistered/Unverified account.

Description:
This product allows you to decide if you want to hide [CODE], [HTML] and [PHP] BBCode content from Unregistered/Unverified on your site.
Hidden content is replaced by a link to your registration page for guests and a simple message for restricted user groups.

========================================
How to install:
========================================
Upload the content of Yilmaz - Hide [code,php,html] content from guests directory to your root.
that's all it.
enjoy..



Please Mark as Installed if you use this. :)
Donations always appreciated. :up:


1.3.0
Cache issue fixed

========================================
How to uninstall:
========================================
1. Remove the package "yilmazhidebbcodes" that located in /core/packages/
2. Go to "Manage Products" in the admincp and delete the product named "Yilmaz - Hide [code,php,html] content from guests"

I just want to make a suggestion just to point
by Chicoynano
27 Oct 2020 21:24

3 Attachment(s)
I just want to make a suggestion just to point. In hiding html code the phrase Click Here To Register does not appear… It is found in core / packages / yilmazhidebbcodes / api / content / text.php on line 50. Maybe you left it that way for some reason but I left screenshots for if it is of interest for the text to be displayed. As always, thank you very much for your work and I'm just trying to help.

yilmaz 27 Oct 2020 23:55

2 Attachment(s)
@Chicoynano
Thank you for your attention.
I edited the overlooked part.
It does not accept bbcode and html tags in HTML and PHP.
It is necessary to find a solution to this, I would be glad if someone who knows the solution definitely offers a suggestion.
Thanks again.

Chicoynano 28 Oct 2020 02:09

1 Attachment(s)
So far i got this

Zweeper 28 Oct 2020 06:13

Hey, just installed, but problem as previous versions of this hack. Maybe it is just me?



1. Load a page with a hidden code as a guest, delete cache.
2. visit the page as user: code is hidden.

3. visit the page as user (you did that before), delete cache.
4. visit the page as a guest: code is not hidden and you can see all content




Can anyone confirm this? VB 5.6.4

yilmaz 28 Oct 2020 08:34

1 Attachment(s)
Quote:

Originally Posted by Zweeper (Post 2604402)
Hey, just installed, but problem as previous versions of this hack. Maybe it is just me?



1. Load a page with a hidden code as a guest, delete cache.
2. visit the page as user: code is hidden.

3. visit the page as user (you did that before), delete cache.
4. visit the page as a guest: code is not hidden and you can see all content




Can anyone confirm this? VB 5.6.4

I tested it again in VB 5.6.4, if I put the text.php line 18 in front of it with // comment, it will be what you said. 18. This line will delete the cache.
The problem may be whether or not line 18 works.

core/packages/yilmazhidebbcodes/api/ content/text.php on 18. Screenshot

yilmaz 28 Oct 2020 08:38

Quote:

Originally Posted by Chicoynano (Post 2604399)
So far i got this

It's bad that there is no separate login page in VB 5.x.x.
How do we detect the login link, that's the problem.

yilmaz 28 Oct 2020 09:13

1 Attachment(s)
Quote:

Originally Posted by Zweeper (Post 2604402)
Hey, just installed, but problem as previous versions of this hack. Maybe it is just me?



1. Load a page with a hidden code as a guest, delete cache.
2. visit the page as user: code is hidden.

3. visit the page as user (you did that before), delete cache.
4. visit the page as a guest: code is not hidden and you can see all content




Can anyone confirm this? VB 5.6.4

Cache issue fixed in version 1.2.0

Zweeper 28 Oct 2020 09:20

Seems to work now! Good job, nice hack! :) I keep on testing

lange 28 Oct 2020 11:51

Thank you very much! I will test later.

yilmaz 28 Oct 2020 18:07

Quote:

Originally Posted by Zweeper (Post 2604406)
Seems to work now! Good job, nice hack! :) I keep on testing

Quote:

Originally Posted by Wayne Luke;n4449447
Do you have "Cache BBCode Render by Usergroup" enabled on your site?

This can help

your-website.ext/admincp/options.php?do=options&dogroup=bbcode

Cache BBCode Render by Usergroup

Zweeper 28 Oct 2020 19:55

It is working since your last update without the cache bbcode render by usergroup option!

delicjous 29 Oct 2020 09:50

Great idea, and I respect your work... but I have some concerns.
The way you did the trick wipe out the entire cache every time a user LOOK into any post/ thread. Thats because you emty the cache every time an object of the class of your API-Extension been created/ initialized (thats the way the constructor works). So the forum will never build a cache of any data if any of your hide-mods are installed and that will (probably) affect the entire page speed. #Also if you install more than one of your hide-mods, the database-tables will be emptied for each mod. So if 2 of your mods installed and a user is open 1 thread, post, page.... the entire cache-table-data will be deleted 2 times. There is a table cache and another cacheevent. You comment out the part that emty the cacheevent ... you should delete that also.

If it is ok for you, I will upload a similar mod in the next days/weeks that only delete the cache of the nodes with bbcodes. So the cache works almost normal... and if the option "Cache BBCode Render by Usergroup" is enabled you do not need to delete the cache... so I would select that option to find out if it is necessary to delete the cache of the post.

yilmaz 29 Oct 2020 12:43

Quote:

Originally Posted by delicjous (Post 2604421)
If it is ok for you, I will upload a similar mod in the next days/weeks that only delete the cache of the nodes with bbcodes. So the cache works almost normal... and if the option "Cache BBCode Render by Usergroup" is enabled you do not need to delete the cache... so I would select that option to find out if it is necessary to delete the cache of the post.

@delicjous, thank you for the great suggestion.
I will apply and update the option you said.
Thanks again.


I did as you suggested

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


delicjous 29 Oct 2020 14:20

Quote:

Originally Posted by yilmaz (Post 2604424)
@delicjous, thank you for the great suggestion.
I will apply and update the option you said.
Thanks again.


I did as you suggested

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

Thats only a part of my suggestion but even that is more solid than before (recommand if empty because options could be empty!).
Now you have the best solution for users who cachebbcodebyusergroup, but if not cachebbcodebyusergroup the entire cache is still emtied every time a user look into a post. The cache of 30 posts are about 1MB of data, so if you have 30 000 posts and a highly frequented forum you have around 1000 MB data without cache by usergroup, even you use only 5 usergroups the cache could grow fast. So this option is not good for everyone.


All times are GMT. The time now is 05:04.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.