Webmastersite.net
Register Log In

Javascript Export Customization

Comments on Javascript Export Customization

Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Jan 26, 2005 - 10:04 AM:

Is there any way to customize the output of the Javascript export?

Currently, when I create a .js file, the links it creates link directory to the respective sites rather than to the details pages on my site. If I use the .js file on another of my sites, I'd rather be taking them to my own site first rather than directory to the linked site, otherwise it's not going to be very useful.

The above is the main thing I'd want to be able to do, but other, smaller customizations I'd like would be to remove the automatic numbering, change the way it numbers the results (using a period instead of a parenthesis), and possibly display other information (like category of link, vote, hits, etc).

I guess what that all amounts to is if the js export can have it's own template.

Thanks,
Adam
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Jan 27, 2005 - 4:03 AM:

Did you search for 'javascript export' in the manual before posting? If so, tell me how what you want differs from what's described there. I guess maybe you're suggesting each one on the 'javascript export' page should offer a different template choice, but for that you can just use the static file generation option instead.
Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Jan 27, 2005 - 9:19 AM:

Thank Paul. Everything I needed was right there. I must have had a brain fart because I remember pulling that help page but my mind must have been in another place when reading it.
Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Jan 27, 2005 - 12:35 PM:

I've been playing around with this some more and got most of my lists to work with the JS export. However, there is one that doesn't:

<CONFIG>links,rating,10,descending,votes>9,,</CONFIG>

It's ignoring the votes>9 condition when creating the .js file, so it ends up displaying the top rated links regardless of the number of votes it has, when it should only be showing links that have at least 10 votes.

Is there any way to get that parameter to work with this function?
Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Jan 31, 2005 - 9:16 AM:

Any ideas on this one? Still no luck on my end.
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Feb 01, 2005 - 10:07 PM:

Haven't checked your toplist, but just as a guess, try changing commonfuncs.php to replace
   $querystring = '&type[1]='. $parts[0] .'&field[1]='. $parts[1] .'&number[1]='. $parts[2] .'&ascdesc[1]='. $parts[3] .'&condition[1]='. $parts[4] .'&start[1]='. $parts[6] .'&columns[1]='. $parts[7];
with
   $querystring = '&type[1]='. $parts[0] .'&field[1]='. $parts[1] .'&number[1]='. $parts[2] .'&ascdesc[1]='. $parts[3] .'&thecondition[1]='. $parts[4] .'&start[1]='. $parts[6] .'&columns[1]='. $parts[7];

and let me know if that solves your problem so I know if I should make that change.
Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Feb 02, 2005 - 12:56 PM:

Thanks Paul, that worked perfectly.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.