Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 01-31-2005, 01:28 PM   #1 (permalink)
jdm
Registered User
 
Join Date: Jan 2005
Posts: 4
jdm is on a distinguished road
Post 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
jdm is offline   Reply With Quote
Old 01-31-2005, 01:36 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,446
sde is on a distinguished road
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
sde is offline   Reply With Quote
Old 01-31-2005, 05:29 PM   #3 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
lol ... my eyes hurt from reading these posts.
idx is offline   Reply With Quote
Old 02-01-2005, 08:38 AM   #4 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
har har.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 02-04-2005, 08:27 AM   #5 (permalink)
jdm
Registered User
 
Join Date: Jan 2005
Posts: 4
jdm is on a distinguished road
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!!)
jdm is offline   Reply With Quote
Old 02-04-2005, 12:41 PM   #6 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,694
redhead is on a distinguished road
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.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 02-05-2005, 08:47 AM   #7 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Quote:
Originally Posted by jdm
you don't understant what i want...

Tell me about it.. An example would be a good thing.. --martha
idx is offline   Reply With Quote
Old 02-10-2005, 07:53 AM   #8 (permalink)
jdm
Registered User
 
Join Date: Jan 2005
Posts: 4
jdm is on a distinguished road
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!!!
jdm is offline   Reply With Quote
Old 02-10-2005, 10:36 PM   #9 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,694
redhead is on a distinguished road
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.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 02-11-2005, 03:09 PM   #10 (permalink)
jdm
Registered User
 
Join Date: Jan 2005
Posts: 4
jdm is on a distinguished road
An example please...
jdm is offline   Reply With Quote
Old 02-12-2005, 07:05 AM   #11 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,694
redhead is on a distinguished road
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.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 04:59 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting