Hide the content of [code] tags from guests

Started by vbgamer45, March 29, 2011, 09:50:16 PM

Previous topic - Next topic

vbgamer45

Link to Mod

This mod will hide the content of code tags from guests.

Instead of content of code tags, guests will be shown a default message saying -
"Only registered users can see contents. Please click here to Register or Login."

With the admin panel provided by the mod, an admin can:
- Enable/disable the mod
- Select the boards on which mod should be enabled
- Change the message to be shown to guests


Note - By default none of the boards is selected, after installing the mod, please enable the mod on the boards as you desire.


Change Log


Version 1.2
- A major overhaul of mod.
- Added an admin panel where one can select board on which mod should be activated
- Option to change the text to be shown to the guests, when guests view content of code tags
- Minor bug fixes


Version 1.1
- Mod updated for SMF 2.0 final.
- License added to the mod.


Github Link


License
* This SMF Modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jaisi

Great mod thanks for sharing but joker bhai main colors change karna chahata hoon kya yeah possible hai aur jo font hai woh bold and red karana chahata hoon kon sa file modify karan padega please help me

Joker™

Your SMF version and theme?

Also, please ask questions in English as if someone faces the same issue he can read your question and find the appropriate answer :).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

jaisi


Joker™

So if I'm correct you want to make text-font bold and red in color in code tags?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

jaisi

yes u r right just look like your forum freakygurus

Joker™

go to

themes\default\css\index.css

Code (Find:) Select
code.bbc_code {
    background: none repeat scroll 0 0 #EEEEFF;
    border-bottom: 2px solid #999999;
    border-top: 2px solid #999999;
    display: block;
    font-family: "dejavu sans mono","monaco","lucida console","courier new",monospace;
    font-size: x-small;
    line-height: 1.5em;
    max-height: 24em;
    overflow: auto;
    padding: 3px 1em;
    white-space: pre;
}



Code (Replace it with:) Select
code.bbc_code {
    background: none repeat scroll 0 0 #EEEEFF;
    border-bottom: 2px solid #999999;
    border-top: 2px solid #999999;
    color: red;
    display: block;
    font-family: "dejavu sans mono","monaco","lucida console","courier new",monospace;
    font-size: x-small;
    font-weight: bold;
    line-height: 1.5em;
    max-height: 24em;
    overflow: auto;
    padding: 3px 1em;
    white-space: pre;
}



It has been ages since I properly went to that forum and made any changes to it.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

jaisi

Sorry to say but i'am not able to find that code here is my index.css file please check

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

jaisi


mariusfv

Hi,

I like your mod, but I suggest you if possible to add an exception:
"Admin to have possibility to post code tag without hide the content from guest" I think Admin always know what are doing with his forum.
10x

Joker™

Quote from: mariusfv on April 08, 2011, 02:19:59 AM
Hi,

I like your mod, but I suggest you if possible to add an exception:
"Admin to have possibility to post code tag without hide the content from guest" I think Admin always know what are doing with his forum.
10x
Sorry I can't understand what are you saying exactly. This mod mainly encourages user to register irrespective of member ranks.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

jaisi

Joker bro it is possible to instal both mod  Hide Tag Special and your mod ??

Joker™

Quote from: jaisi on May 16, 2011, 03:19:13 PM
Joker bro it is possible to instal both mod  Hide Tag Special and your mod ??
I've not seen that mod yet so not sure whether it will work with this mod or not.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

OCJ

Been waiting for this for a while as all the old mods no longer work - thanks.
After installing I expected to see bbcode but nothing there - do the tags have to be typed in manually?

I can put it in a boiler plate anyway but  would like to confirm which way it works - bbcode from editor or manual.

Andy

Sorry... Ive just found it! #

Joker™

Quote from: Joker™ on March 29, 2011, 09:50:16 PM
Link to Mod

This mod will hide the content of code tags from guests. Instead of content of code tags guests will be shown a message saying -

Only registered users can see contents. Please click here to Register or Login.

See the screen shot attached below.
It will simply hide the code tag for guests. Have you seen the screen shots yet?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Bugo

Unfortunately, the contents of the code tag appears in forum rss feed => guests see it.

bruce86

this applies only to the first post and the others? thanks

Joker™

Quote from: Bugo on July 09, 2011, 12:36:15 AM
Unfortunately, the contents of the code tag appears in forum rss feed => guests see it.
Nice catch, will try to see it later tonight.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Quote from: Bugo on July 09, 2011, 12:36:15 AM
Unfortunately, the contents of the code tag appears in forum rss feed => guests see it.
Bugo I'm pretty sure that in News.php this function is getting data parsed for rss

function cdata_parse($data, $ns = '')


I might take some time to crack that function, but TBH seems to be a tough task :P.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: