Webmastersite.net
Register Log In

Javascript Export

Comments on Javascript Export

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Oct 13, 2008 - 1:50 AM:

I have used this method many times with no problem, however, now I come to set it up with v.5 series I just cannot get it to work!

I have my usual toplist showing toplevel categories as a menu - no problem there. However, I want that to also show on non wsn pages so I do the following for javascript export...

To generate: export-menu|categories,priority;name,50,ascending,parent='0' ,,,0,0,0,0,0,0,,0

to file: menu.js

I call it: <script language="javascript" src="http://www.123photographs.co.uk/javascript/menu.js"> </script>

My export-menu.tpl...

<!-- BEGIN TOPLIST -->
<CONFIG>categories,priority;name,50,ascending,parent ='0',,,0,0,0,0,0,0,,0</CONFIG>
<li><a href="{CATURL}" title="{CATNAME}">{CATNAME}</a></l i>
<!-- END TOPLIST -->

I also tried giving the toplist a number, but that didn't work.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 13, 2008 - 10:29 PM:

Works fine for me copying and pasting what you wrote.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Oct 13, 2008 - 10:40 PM:

[sigh] so why doesn't it for me! disapproval
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 14, 2008 - 12:07 PM:

Try changing
if ($template) $template = new template('custom/'. $template .'.tpl');
else $template = new template('javascript_export.tpl');
to
if (!$template) $template = new template('javascript_export.tpl');
in exporter.php.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Oct 17, 2008 - 10:07 AM:

No, that doesn't seem to have worked
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 17, 2008 - 11:25 AM:

Well, all I can say is that these settings produce this result.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Oct 17, 2008 - 12:16 PM:

not for me!

I noticed that you didn't have all the commas and zeros after parent='0' so I removed them in case that was the problem, but it wasn't.

My menu.js file just shows...

document.write('');
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Oct 17, 2008 - 10:41 PM:

babrees,

I actually tried this for you and was getting the same thing as you. Then I looked at Paul's settings and noticed that his template name is exportmenu not export-menu. Took out the - and it worked for me. Give it a try see if that helps.

Oh, and I also noticed you have a semi-colon and not a comma after priority. Not sure if that makes a difference, but I've only seen commas in toplists.

Good luck!
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Oct 18, 2008 - 12:38 AM:

THANK YOU HAI !!

Taking the hyphen out made it work! Obviously v.5 no longer likes that. I didn't think of that because Paul had said he had cut and pasted what I had put.

The semi-colon tells it that there are two sortings - first by priority and then by name.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
Posted Oct 18, 2008 - 6:52 PM:

Ah. The - character is a directory separator for custom templates, same as /. Should never have worked.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.