http://www.phpbb.com.tr/forum/test/phpbb/modlar.html gibi olan bir adres şu şekilde çıkacaktır ;
http://www.phpbb.com.tr/......modlar.html
Kod: Tümünü seç
##############################################################
## MOD İSMİ : Chunk Long URLs
## MOD YAPIMCISI : Joe Belmaati < belmaati@gmail.com > (Joe Belmaati) N/A
## MOD AÇIKLAMASI: Tired of long urls that strecth your phpBB layout?
## This mod will chunk long urls.
##
## KURULUM SEVİYESİ: BASİT
## KURULUM SÜRESİ : 2 DK
## EDİTLENECEK DOSYALAR: includes/bbcode.php
##
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes: The long links will look like this:
## http://yoursite.com/fhjfgjf.....dfhdj.php. Short urls will
## not be touched
##############################################################
## MOD History:
##
## 2006-01-31 - BETA 0.0.3
## - bugfixes.
##
## 2006-01-30 - BETA 0.0.2
## - small fix: Only touch urls.. :-)
##
## 2006-01-29 - BETA 0.0.1
## - initial BETA
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ AÇ ]------------------------------------------
#
includes/bbcode.php
#
#-----[ BUL ]------------------------------------------
#
// matches an email@domain type address at the start of a line, or after a space.
#
#-----[ ÖNCESİNE EKLE ]------------------------------------------
#
/**
* Chunk long urls to avoid page stretching. This gaggle of code could
* be boiled down to fewer lines, but it would make it hard to read.
* By tampering with the string here we avoid having to evaluate the
* regex above. First we isolate hyperlinks.
*/
$beginlink = strpos($ret, '<a');
$endlink = strpos($ret, '</a>') + 4;
$lengthlink = $endlink - $beginlink;
$link = substr($ret, $beginlink, $lengthlink);
/**
* Now we process the isolated hyperlink. Only change length of links
* more than 50 characters in length.
*/
$begin = strpos($link, '>') + 1;
$end = strpos($link, '<', 2);
$length = $end - $begin;
$urlname = substr($link, $begin, $length);
$shorturlname = (strlen($urlname) > 50) ? substr_replace($urlname, '.....', 30, -10) : $urlname;
$ret = str_replace('>' . $urlname . '<', '>' . $shorturlname . '<', $ret);
#
#-----[ KAYDET VE KAPAT ]------------------------------------------
#
# EoM