Advertisement:

external references

Aloittaja rtyug, kesäkuu 29, 2008, 01:49:48 IP

« edellinen - seuraava »

rtyug

external references

I try to close external references for guests! but to settle internal!

for the authorized users to settle internal and external references!


Subs.php on ~ (1108 - 1550) line



$codes = array(
.....................
         array(
            'tag' => 'url',
            'type' => 'unparsed_content',
          'content' => ' '<a href= "$1"  target="_blank">$1</a>',
            'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
         ),
         array(
            'tag' => 'url',
            'type' => 'unparsed_equals',
            'before' => '<a href="$1" target="_blank">',
            'after' => '</a>',
            'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
            'disabled_after' => ' ($1)',
),
......................
);


we replace


array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => $str0,
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $str1,
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),

before:
$codes = array(


if ($context['user']['is_admin'])   {
$str0 = '<a href="$1" target="_blank">$1 </a>';
$str1 = '<a href="$1" target="_blank">';
}

else {
$str0 = '<a href="http://mydomen.com/goo.php?url=$1" target="_blank">$1</a>';
$str1 = '<a href="$1" target="_blank">';
}


does not work:


if ( strtr($1, 'domenl.com'))   {
$str0 = '<a href="$1" target="_blank">$1</a>';
$str1 = '<a href="$1" target="_blank">';
}

Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /usr/l/Subs.php on line 1108

how here to do? say please!

... domenl.com - search, if references internal that to leave it!

rtyug

how to work with a variable $1 ?

it is simply done on perl


Advertisement: