Anchors in Articles

Use GitHub to post feature requests for phpwcms.
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

when jumping to the anchor it will always play the anchor to the highest point on the screen it can: the top it possible but if the anchor has only half a screen of content below it it will appear in the middle of the screen etc..


add this code in your fron.func.inc.php @ line 1337 or so (just after the last reptag code you have :) )

The following repTag is only a hack for site wide 'anchor jumping' it may be used under all circumstances any other replacement tag is usable.

Code: Select all

	// internal Anchor-Link | useage: [GOTO:structureID,articleID:anchorname]string[/GOTO]
	$search[pS1]		= '/\[GOTO:(\d+):(\w+)\](.*?)\[\/GOTO\]/';
	$replace[pS1]		= '<a href="index.php?id=0,$1,0,0,1,0#$2">$3</a>';
USEAGE: it is only nessassery to know the target ArticleID: these may be found by hovering over the add/edit icon of the target aritcle and reading from the bottom (info) line of your browser.

SET ANCHOR: {A:anchor_name}
GOTO TAG: [GOTO:structureID,articleID:anchor_name]string[/GOTO]

hope it helps: until a better solution comes along.
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Hi pSouper,

seems to be a Mac-problem. On windows it works. Thanks to your tags!

Have a great sunday

Macangelo
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
Locked