473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

BBCode Magic Links

I need to convert text in posts to clickable truncated links.

i.e. http://www.domain.com/test/index.php...123&test=13123

in to <a href="www.domain.com/test/index.php?
com=123123&option=123123&test=13123">www.domain.co m/test/....</a>
I know how to convert links in to clickable links, but I don't know
how to truncate (ShortenText) the URL too so it doesn't cause the
screen to go funny.

Thanks,
Anthony

Mar 7 '08 #1
2 1492
eski007 wrote:
I need to convert text in posts to clickable truncated links.

i.e. http://www.domain.com/test/index.php...123&test=13123

in to <a href="www.domain.com/test/index.php?
com=123123&option=123123&test=13123">www.domain.co m/test/....</a>
I know how to convert links in to clickable links, but I don't know
how to truncate (ShortenText) the URL too so it doesn't cause the
screen to go funny.

Thanks,
Anthony

Anthony,

Try alt.html. This has nothing to do with PHP - it's straight HTML
scripting.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Mar 7 '08 #2
On Fri, 07 Mar 2008 18:20:30 +0100, eski007 <es*****@gmail.comwrote:
I need to convert text in posts to clickable truncated links.

i.e. http://www.domain.com/test/index.php...123&test=13123

in to <a href="www.domain.com/test/index.php?
com=123123&option=123123&test=13123">www.domain.co m/test/....</a>
I know how to convert links in to clickable links, but I don't know
how to truncate (ShortenText) the URL too so it doesn't cause the
screen to go funny.
Play around with strlen() & substr().
--
Rik Wasmus
Mar 8 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave Moore | last post by:
Hi All, I'd like enable visitors to my website to use bbcode and emoticons whilst entering text into a form. Are there any standard lumps of php/javascript I can use for this purpose?. In...
1
by: Rob Meade | last post by:
Hi all, Back on the bbcode parsing (again)... Having a few problems now with nested tags - it would seem that I had written my test string in a way that worked perfectly with the parser -...
1
by: 如履薄冰 | last post by:
BBcode reference: http://www.phpbb.com/phpBB/faq.php?mode=bbcode I want write a BBcode module in Python, but I'v not idea for this. Who can tell me about this arithmetic? ( I'm so sorry for my...
6
by: Thaqalainnaqvi | last post by:
IPB WARNING mysql_query() : Unable to save result set (Line: 457 of /ips_kernel/class_db_mysql.php) There appears to be an error with the database. You can try to refresh the page by clicking...
0
by: Will McGugan | last post by:
Hi, I have written a BBCode parsing module that may be of use to some people. It turns BBCode in to XHTML snippets. See the following page if you are interested... ...
10
TheServant
by: TheServant | last post by:
Another thread sparked an interest: With using BBCode, do you have to install that package or is it the browser that recognises it? I would like to make my own for my website to let certain users...
8
by: raaman rai | last post by:
i am adding dynamic contents in my website. So i also want to have a news or announcements to be dynamically displayed. But for this i need to use BBCode. But in reference to this, i dont know how...
2
by: bgold12 | last post by:
I already posted this message, but it didn't work or something. So if this is a duplicate, ignore it. I just can't figure out how to install this extension. From what I understand, there needs...
2
by: bgold12 | last post by:
I just can't seem to figure out how to install this extension. From what I understand, there needs to be a .dll file located in the PHP extensions folder, and there needs to be a line in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.