new basic simple RT for Links incl. leading thumbnail

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

new basic simple RT for Links incl. leading thumbnail

Post by flip-flop »

Hi,


I have advanced the RT´s [INT] [EXT] [ID] to [INTI] [EXTI] [IDI].
The new tag contain a leading little image.
By german law we need a identification of external links. [EXTI]
That´s BASIC!!!!
An other tag are the "ancorjump". [ANCI]

It is shown like this:
Image

You can see more at http://www.phpwcms.planmatrix.de

PATCH:
/include/inc_front/front.func.inc.php (Tested in 1.2.3 DEV and 1.2.5 CVS)
Add the following lines between

~ Line 1620

$replace[26] = '<a href="#" onClick="BookMark_Page();return false;" title="$1">$2</a>';
---------------------------------------------
-->> Code
---------------------------------------------
$string = preg_replace($search, $replace, $string);

and download the new images and copy them to /img/article/ (http://www.phpwcms.planmatrix.de) or rename them for your own.

Code: Select all

// kh tag including leading image
// kh 17-08-05 [ANCI ancorname]Text[/ANCI] internal Link to ancor including image (string)
$search[27] = '/\[ANCI (.*?)\](.*?)\[\/ANCI\]/';
$replace[27] = '<img src="img/article/anclink_2.gif" width="13" height="9" border="0" vspace="0" hspace="0" alt="ancorlink"><a href="#$1">$2</a>';

// kh 17-08-05 [IDI alias]Text String[/IDI] internal Link to 'aliased' site structure entry including image (string)
$search[28] = '/\[IDI (.*?)\](.*?)\[\/IDI\]/';
$replace[28] = '<img src="img/article/intlink_2.gif" width="13" height="9" border="0" vspace="0" hspace="0" alt="intlink"><a href="index.php?$1">$2</a>';

// kh 17-08-05 [INTI url]Text[/INTI] internal Link including image (string)
$search[29] = '/\[INTI (.*?)\](.*?)\[\/INTI\]/';
$replace[29] = '<img src="img/article/intlink_2.gif" width="13" height="9" border="0" vspace="0" hspace="0" alt="intlink"><a href="$1">$2</a>';

// kh 17-08-05 [EXTI url]Text[/EXTI] external link which opens in a new window including image (string)
$search[30] = '/\[EXTI (.*?)\](.*?)\[\/EXTI\]/';
$replace[30] = '<img src="img/article/extlink_2.gif" width="13" height="9" border="0" vspace="0" hspace="0" alt="extlink"><a href="$1" target="_blank">$2</a>';

// kh 17-08-05 [MAILI eMail_Adress]Text[/MAILI] this pharses out an E-Mail Link without subject including image (by Florian, 21-11-2003)
$search[31] = '/\[MAILI (.*?)\](.*?)\[\/MAILI\]/i';
$replace[31] = '<img src="img/article/maillink_2.gif" width="16" height="9" border="0" vspace="0" hspace="0" alt="eMail"><a href="mailto:$1">$2</a>';
// ende patch kh
It is not a good idea to patch the front.func.inc.php. But i can´t implement it better.
A php programmer please should write a new RT. Or better Oliver implement it.
Imho it´s a basic feature. (See german law for professional web presences).

Gruß Knut
Last edited by flip-flop on Sun 11. Mar 2007, 08:51, edited 2 times in total.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

could you provide a link on the German law explanation

TriP
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
phalancs
Posts: 793
Joined: Thu 19. Feb 2004, 05:09
Location: Germany

Post by phalancs »

this is nice, i wonder if we might have a cntent part linking to all anchors. This would be an "index functionality".

Got no idea how to do that, not yet..
:)
2008
Post Reply