Admun's NUDN

admun

  • San Francisco, CA

Navigation

Navigation

Categories

To Make createItemLink() Work....

Just saw some code from NP_Trackback that need to make createItemLink() to work... I ran into some problem in the past that have to resolve into manually construct the item link. In fact, what need to do is to set $CONF['ItemURL'] using the following code:
global $manager, $CONF;
// need to reset the ItemURL so createItemLink work properly
$blog =& $manager->getBlog(getBlogIDFromItemID($itemid));
$CONF['ItemURL'] = preg_replace('/\/$/', '', $blog->getURL());

// then createItemLink() will work!
$url = createItemLink($itemid);

16:58:13 on 02/21/07 by Admun - Category: Developer Notes - tags: - print

Comments

No comments yet

Add Comments