- Moderated by:
- Support Team
-
- rank:
-
Helper
- registered:
- November 2002
- Status:
- offline
- last visit:
- 29.05.07
- Posts:
- 203
I'm writing my module and I've finished the pnversion.php, pninit.php initialization functions, and pntables.php. I decided to upload what I have so far to see if it would initialize and I can render the first template of my interactive init. The problem is that the Continue link I am generating with the pnmodurl template function is the wrong URL. Here is the template code:
Code
<H2><!--[pnml name='_GWBTINIT']--></H2>
<br />
<div style="text-align:center;">
<!--[pnml name='_GWBTWELCOME' html=1]--><br />
<a href="<!--[ pnmodurl modname=pnGWBattleTracker type=init func=step2 ]-->" title="<!--[ pnml name='_GWBTINITCONTINUE' ]-->"><!--[ pnml name='_GWBTINITCONTINUE' ]--></a>
<!--[ pnmodurl modname=pnGWBattleTracker type=init func=step2 ]-->
As you can see, it's almost identical to the template from the example module. The link the generated link is simply:
Code
index.php?name=pnGWBattleTracker
I don't get it. I looked through the pnModURL() code and I can't figure out what I'm missing. Any ideas? Do I need to post more code? -
- rank:
-
Helper
- registered:
- November 2002
- Status:
- offline
- last visit:
- 29.05.07
- Posts:
- 203
Never mind. On a hunch, I copied the pnadmin.php file into my new module directory and the link now works. I noticed some code in the pnModURL() code that changed the URL structure based on whether the admin property was set to true and apparently, it needs to see the pnadmin.php file in the directory in order to verify there are admin functions.
Of course, I can't regenerate modules when I do that because all of the function names are wrong, but I was able to test by regenerating the modules, clicking on Initialise, then copying the pnadmin.php from the Example module. Then I can run through my interactive init. It's probably not the best way, but it works.
That will go in my doc, for sure.
