1
nicoleking
Wiedness in Template editing
  • 2005/5/15 23:36

  • nicoleking

  • Just popping in

  • Posts: 8

  • Since: 2004/12/31


Hallo everyone, especially those who read this.

I'm having a bad time with a template. I've been extending the mylinks module because I found a situation where it could get into a tremendous pickle. Try this out ...

1. Create a link from the MyLinks admin interface where the URL is completely empty (ie. does not even contain the text "http://"). It has to be done from this interface, if you try to submit a link with an empty URL from the user interface, it complains (probably quite rightly).

3. Ensure that the module preferences are set that the links are NOT opened within a frame.

4. Now go to the links list items and click on your link. Your browser shoudl open a couple of instances of itself, the last one will be constantly refreshing itself with a blank URL. Well, that's what IE6 and Firefox both do.

The problem is that the first window to open contains a refresh directive with interval of 0 seconds and a blank URL from which to refresh the window.

My plan after looking at the way the link to the linked website is managed was to create a "catch-all" page for those links that do not have a URL recorded. It was relatively easy to hack the php (knowing php not at all, but being an otherwise fair programmer) to do this in /modules/mylinks/view.php. In essence what happens is that if there is a URL, the browser is directed to open that URL. If there is no URL, the "catch-all" page is displayed.

Since I wanted the catch-all page to look like a regular XOOPS page, I decided to add it to the template set of mylinks. I added appropriate lines to the xoops_version.php file. I created a php file and a template file in the appropriate places: the php under /modules/mylinks and the template in /modules/mylinks/templates.

Then after a bit of beggaring about I realised I have to update the modules from SystemAdmin=>Modules. This proceeded normally and my new template appeared under SystemAdmin=>Templates.

I could even edit the template, but every time I put some content in it (it started out totally empty) and pressed "submit", the content came back empty! This has me totally baffled - I can find the record in the database which has the correct content. The template file on disk has the correct content, but the template editor ignores all my attempts at modifying it. I'm disabled caching competely and enabled "Update module template .html files from themes/your theme/templates directory".

Is this a bug or have I dne something daft?

Many thanks in advance.

Nicole (aka Catsmuvva)

2
nicoleking
Re: Wiedness in Template editing
  • 2005/5/15 23:47

  • nicoleking

  • Just popping in

  • Posts: 8

  • Since: 2004/12/31


There is no step 2 in the list above. Sorry, my bad.

Nicole

Login

Who's Online

320 user(s) are online (214 user(s) are browsing Support Forums)


Members: 0


Guests: 320


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits