|
 |
|
 |
01-31-2005, 01:28 PM
|
#1 (permalink)
|
|
Registered User
Join Date: Jan 2005
Posts: 4
|
Post Hide Link
Hello I Want To Know How I Can Went Post A Link In A Forum How I Can Hide And Only Went The Other Reply Show The Link
|
|
|
01-31-2005, 01:36 PM
|
#2 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,475
|
Give Me Some Code So I Can Went See How You Are Getting The Data And Went Then I Will Try To Give You An Idea On Went How To Do It.
Welcome To The Boards 
__________________
Mike
|
|
|
01-31-2005, 05:29 PM
|
#3 (permalink)
|
|
Senior Grasshopper
Join Date: Jun 2003
Location: FL
Posts: 317
|
lol ... my eyes hurt from reading these posts.
|
|
|
02-01-2005, 08:38 AM
|
#4 (permalink)
|
|
$_['Your_Mom'];
Join Date: May 2002
Location: Santee
Posts: 627
|
har har.
|
|
|
02-04-2005, 08:27 AM
|
#5 (permalink)
|
|
Registered User
Join Date: Jan 2005
Posts: 4
|
you don't understant what i want...
in many forum's they want to reply in post to show a link to download the file or any other... ok how they do that? how they hide a link? (i don't remember one forum to show what i mean!!)
|
|
|
02-04-2005, 12:41 PM
|
#6 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
|
Let me see, if I get this right.
You want to be able to post a link in your own reply to something, but it's first when someone replies to your post with your orriginal link inside the [ quote][/ quote] in their post, your link is made active ??
This can be done with the code used to show the contence within the [ quote][/ quote] tags, just only parse the text through your automatic link converter, if the text is appearing between the [ quote][/ quote] tags.
|
|
|
02-05-2005, 08:47 AM
|
#7 (permalink)
|
|
Senior Grasshopper
Join Date: Jun 2003
Location: FL
Posts: 317
|
Quote:
|
Originally Posted by jdm
you don't understant what i want...
|
Tell me about it.. An example would be a good thing.. --martha
|
|
|
02-10-2005, 07:53 AM
|
#8 (permalink)
|
|
Registered User
Join Date: Jan 2005
Posts: 4
|
an example !!!!
1) i made a new post with a link inside "www.msn.com"
2) the other user open the post but they don't show the link!!
3) went they reply the link show up!!!!
that's all!!! 
|
|
|
02-10-2005, 10:36 PM
|
#9 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
|
Quote:
|
Originally Posted by jdm
1) i made a new post with a link inside "www.msn.com"
2) the other user open the post but they don't show the link!!
3) went they reply the link show up!!!!
that's all!!! 
|
Just like I told ya.
|
|
|
02-11-2005, 03:09 PM
|
#10 (permalink)
|
|
Registered User
Join Date: Jan 2005
Posts: 4
|
An example please... 
|
|
|
02-12-2005, 07:05 AM
|
#11 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
|
PHP Code:
<?php
function ShowLinks($Text, $show=1)
{
// First match things beginning with http:// (or other protocols)
$NotAnchor = '(?<!"|href=|href\s=\s|href=\s|href\s=)';
$Protocol = '(http|ftp|https):\/\/';
$Domain = '[\w]+(.[\w]+)';
$Subdir = '([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
$Expr = '/' . $NotAnchor . $Protocol . $Domain . $Subdir . '/i';
if($show)
$replace = "<a href=\"$0\" title=\"$0\" target=\"_blank\">$0</a>";
else
$replace = "";
$Result = preg_replace( $Expr, $replace, $Text );
// Now match things beginning with www.
$NotAnchor = '(?<!"|href=|href\s=\s|href=\s|href\s=)';
$NotHTTP = '(?<!:\/\/)';
$Domain = 'www(.[\w]+)';
$Subdir = '([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
$Expr = '/' . $NotAnchor . $NotHTTP . $Domain . $Subdir . '/i';
if($show)
$replace = "<a href=\"http://$0\" title=\"http://$0\" target=\"_blank\">$0</a>";
else
$replace = "";
return preg_replace( $Expr, $replace, $Result );
}
echo ShowLinks("some www.domain.com that won't show up", 0);
echo "<br>";
echo ShowLinks("some www.domain.com that will show up");
?>
Just use it with the "0" parsed, when it has to do with text referenced within the orriginal post, and not a quoted former post within a post.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
GET and POST with JSP
|
sde |
Java |
1 |
12-30-2004 02:30 PM |
All times are GMT -8. The time now is 10:52 PM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|