Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12374
Latest: LevelLord
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 40212
Total Topics: 7082
Most Online Today: 40
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 44
Total: 44

Author Topic: Registered links  (Read 4695 times)

0 Members and 1 Guest are viewing this topic.

Offline eat_me

  • Newbie
  • *
  • Posts: 1
    • View Profile
Registered links
« on: September 27, 2006, 10:07:15 am »

I've modified Subs.php like in 'Registered links' mod and now if user is a guest he can't see not only links but also images (if images are posted as links like http://somewhere.com/image.gif).
But now I have a problem: if an image's url is from my forum's server, guests can't see this image.  :'(

Can somebody help me? What should I add in code below to solve this problem?
Code: [Select]
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ?
'[<a href="' . $scripturl . '?action=join">' . $txt[97] . '</a>]' : '<img src="$1" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'before' => $user_info['is_guest'] ?
'[<a href="' . $scripturl . '?action=join">' . $txt[97] . '</a>]<div style="display:none">' : '<img src="$1" border="0" />',
'after' => $user_info['is_guest'] ?  '</div>' : '',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl', 'img'),
'disabled_after' => $user_info['is_guest'] ?  '' :  ' ($1)',

Probably I have to add variable $board_url and have to use function parse_url, but if variable $1 is data (here it's a link to an image), then ...

P.S. I'm new at php & smf. ::)

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
5099 Views
Last post October 13, 2006, 05:59:56 pm
by TeamVTEC
2 Replies
3412 Views
Last post January 07, 2007, 12:40:50 pm
by sharks
2 Replies
3928 Views
Last post February 17, 2007, 04:20:20 am
by samozin
0 Replies
2717 Views
Last post January 25, 2009, 03:37:27 am
by darklord
1 Replies
1701 Views
Last post October 11, 2011, 08:03:14 pm
by SMFHacks

+- Recent Topics

Download System Lite by Rock Lee
June 03, 2020, 07:34:24 pm

Font question by SMFHacks
May 27, 2020, 08:15:26 am

Error message with latest SMF 2.1 Github build by Hatshepsut
May 25, 2020, 01:43:26 am

smfblog not working on 2.0.17 by tech9
May 20, 2020, 01:44:34 pm

Copyright removal by stbc
May 18, 2020, 01:27:57 am

Mod Verified User i can't square the image by Rock Lee
May 07, 2020, 07:56:10 pm

SMF4Mobile 2.0 released for SMF 2.0.x by SMFHacks
May 06, 2020, 12:13:14 pm

SMF Social Login Pro - Discontinued? by Nicole
May 02, 2020, 05:47:04 pm

Likes by SMFHacks
April 30, 2020, 09:50:35 pm

Upgrade Issue - by SMFHacks
April 28, 2020, 12:40:13 pm

Powered by EzPortal