Member
Member
micheall   2011-12-09, 07:01
#1

So I'm not sure how to get this accomplished. What I'm trying to do is in the next_news() loop, I need to access the URL for the active news article. I've tried using printNewsURL and getNewsURL both and they trigger the following error:

Quote:[warn] mod_fcgid: stderr: PHP Fatal error: Call to undefined method ZenpageNews::getNewsBaseURL() in /home/micheall/domains/inthemdl.net/public_html/zp-core/zp-extensions/zenpage/zenpage-class-news.php on line 268
I'm assuming that it's because I'm not using it on the news object, however the printNewsTitleLink() etc function just fine. Am I missing somethign blindingly simple?

Edit:
Working with 12/6 nightly btw.

Administrator
Administrator
acrylian   2011-12-09, 11:17
#2

getNewsURL(getNewsTitlelink()) gets the full url or printNewsURL(getNewsTitlelink()) echos it of the current article.

The printNewsTitlelink() function is named a little missleading I admit as "titlelink" refers to the url name of an article and this prints a full `` setup and not just the titlelink itself.

Member
Member
micheall   2011-12-10, 05:15
#3

Ah ok, I figured that's what it was that I had to pass an object to it, just wasn't sure which one. Thanks.

Administrator
Administrator
acrylian   2011-12-10, 12:20
#4

Well, depends. getBaseNewsURL() is a class method of the main Zenpage class but for backward compatibility there is also a template function of the same name (that one is actual the original one, we just restructured the class stuff a little for 1.4.2 for improvement).

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.