1
canbula
Hidden Contents like Vbulletin
  • 2006/12/6 9:03

  • canbula

  • Just popping in

  • Posts: 42

  • Since: 2006/7/10


Everybody knows 'Hidden Content' in Vbulletin forums. Now we can use it in XOOPS. It is very very easy.

File: class/module.textsanitizer.php
We add only a few lines in our module.textsanitizer.php then we can use Hidden Content in news, newbb, sections etc. modules.

Now you must find these lines in module.textsanitizer.php
le="color: #000000"><?php function &xoopsCodeDecode(&$text, $allowimage = 1) { $patterns = array(); $replacements = array();

and change these lines like this
le="color: #000000"><?php function &xoopsCodeDecode(&$text, $allowimage = 1) { $patterns = array(); $replacements = array(); $patterns[] = "/XhiddencontentX(.*)X/hiddencontentX/sU"; if($_SESSION['xoopsUserId']) { $replacements[] = '\1'; } else { $replacements[] = '<a href="'.XOOPS_URL.'/register.php"><img src="'.XOOPS_URL.'/hidden.gif" alt="Hidden Content" /></a>'; }

and alsa I use an image file to explain the situation in my XOOPS root folder, it is hidden.gif..and looks like this
Resized Image

and now you can use it like this
le="color: #000000"><?php XhiddencontentX This is hidden content. You can see this when you register and login X/hiddencontentX

I prefer to use it with XhiddencontentX but you can change it whatever you like

You must wrote the this at the hidden contents beginning
le="color: #000000"><?php XhiddencontentX

and at the end
le="color: #000000"><?php X/hiddencontentX

You can use it with images, articles, news. Its biggest advantage is you haven't to hide all article, with this you can hide only a part in it


Bora Canbula ( boracanbula@gmail.com - http://www.xoopshocasi.com )
hhttp://www.xoops-tr.com - Turkish Xoops

2
Peekay
Re: Hidden Contents like Vbulletin
  • 2006/12/6 11:36

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


This hides content from anonymous (not logged in) users?
A thread is for life. Not just for Christmas.

3
canbula
Re: Hidden Contents like Vbulletin
  • 2006/12/6 21:10

  • canbula

  • Just popping in

  • Posts: 42

  • Since: 2006/7/10


yes it hides the content from anonymous users..they can see the content after login
hhttp://www.xoops-tr.com - Turkish Xoops

Who's Online

162 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits