News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

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


Joker™

Quote from: bruce86 on July 09, 2011, 07:58:53 AM
this applies only to the first post and the others? thanks

Quote from: bruce86 on July 11, 2011, 04:57:44 AM
no answer? ...:)
Missed it in hurry :P. It applies to all, i.e first post and all follow up replies.
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

Kimmie

Quote from: Joker™ on May 16, 2011, 03:24:13 PM
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.


would love to know the answer to this as well. As with the hide tag special, what is seen by guests is simply nothing at all where those tags would normally be and the hide tag mod gives no option (that I am aware of), to display any sort of message to the guest such as "please register to see content" etc and this mod does just that.

(of course for those of us who use the hide tag mod, it would be much easier if that aspect was incorporated into it)  8)

Joker™

Quote from: Kimmie on September 06, 2011, 09:57:35 PM
would love to know the answer to this as well. As with the hide tag special, what is seen by guests is simply nothing at all where those tags would normally be and the hide tag mod gives no option (that I am aware of), to display any sort of message to the guest such as "please register to see content" etc and this mod does just that.

(of course for those of us who use the hide tag mod, it would be much easier if that aspect was incorporated into it)  8)
Ok I've just tested the mod with Hide tag special and both seems to be running fine. Can you people tell me detail what is not working for on your side?


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 does it happen now also, as for me the posts made after installing the mod were able to hide there data on guest mode.
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

soulgeek

If this mod hides contents from Guests, then even Spider is Guest, will it hide Content from it also, (Which defeats the Whole Purpose of SEO).

Or is there Bot or Visitor identification mechanism in this Mod?

Will this Mod hide Contnet in just some JS tabs so that Spiders can Read it or something like that? Will it cause any Anti-SEO impact on Our Forum?
lets Grow Together With Law of Attraction !

Join to Seek a Better Like at
Law of Attraction Forum

Joker™

Quote from: soulgeek on October 02, 2011, 11:31:32 PM
If this mod hides contents from Guests, then even Spider is Guest, will it hide Content from it also, (Which defeats the Whole Purpose of SEO).

Or is there Bot or Visitor identification mechanism in this Mod?
The mod simply hides the codes tag data from guests and as spiders crawls as guests so data must be hidden from them as well.


Quote from: soulgeek on October 02, 2011, 11:31:32 PM
Will this Mod hide Contnet in just some JS tabs so that Spiders can Read it or something like that? Will it cause any Anti-SEO impact on Our Forum?
That is known as clocking and most search engines are deadly against 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

MarkoKg

Great mod Joker! :)

Can i ask if there's a chance to apply this only in one/few specific boards? I tried to add manually code (if board['id'] = xx...blabla) but it didn't worked for me. Any suggestions? I need code content to be hidden only in 3 boards though, if that's possible by any chance.

Thanks! :)

Joker™

Quote from: MarkoKg on September 19, 2012, 04:55:15 PM
Great mod Joker! :)

Can i ask if there's a chance to apply this only in one/few specific boards? I tried to add manually code (if board['id'] = xx...blabla) but it didn't worked for me. Any suggestions? I need code content to be hidden only in 3 boards though, if that's possible by any chance.

Thanks! :)
Will try to work on it in next version :).
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

FragaCampos

Hi, Joker™.

Any news about the board selection method in this mod?

Thanks a lot for this.

Joker™

Noted.

Adding my mods to github, as it is more easy to track issues/features over there, rather than searching them throughout the topics over here.
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™

A newer version rolled out. Checkzz outzz :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

gomzy

i have tried this mod, it work fine on smf 2.0 but problem is that when i view the most recent articles , it does not work... any fix for that?

OCJ

I have 1 problem with it. When there is bbcode and links inside the tags it doesn't display properly - just shows all the tags and bbcode directly. Guess nothing can be done about that?

Other than that it works perfectly

Arantor

Quote from: igirisjin on November 23, 2013, 05:53:15 AM
I have 1 problem with it. When there is bbcode and links inside the tags it doesn't display properly - just shows all the tags and bbcode directly. Guess nothing can be done about that?

Other than that it works perfectly

Um, because that's what the code bbcode does? Designed for posting *code* and therefore negates bbcode...

llmfit

Quotei have tried this mod, it work fine on smf 2.0 but problem is that when i view the most recent articles , it does not work... any fix for that?
Any news?

Joker™

Quote from: llmfit on July 08, 2014, 02:50:25 PM
Quotei have tried this mod, it work fine on smf 2.0 but problem is that when i view the most recent articles , it does not work... any fix for that?
Any news?
Oppss, missed that somehow. Can you provide me a link or point me towards the section where content is still visible :)
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

Abhijit1030

#36
using code tag also in link. can I use hide tag

Using code tag forum looks odd

llmfit

Please FIX this!
./index.php?action=recent
Content of CODE still visible for everyone in this page regardless of the settings!!!!

OCJ

QuoteContent of CODE still visible for everyone in this page regardless of the settings!!!!

This should work, I have similar problem with a mod that hides things. It is a very simple code edit.

http://www.simplemachines.org/community/index.php?topic=316841.msg2104330#msg2104330


vbgamer45

Thanks igirisjin that is a good tip. Will look into it though also why recent.php for some reason isn't hidding it. I think the issue probably is if the code tag isn't completely shown.
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

llmfit

Hi, many users reports that after logging in the forum the content of CODE tag still not visible, as if they are guest. The problem does not occur in all treads but for few number of treads: in particular I noticed that the problem appears when the tread is very very long and when are used a large number of CODE tags. Another thing is that the problem not always occur.

YOU HAVE PM !!

Thx

Advertisement: