Webmastersite.net
Register Log In

Static file generation
unrecognized variables?

Comments on Static file generation

rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted May 31, 2006 - 9:19 AM:

Paul,

I have a problem with static file generation of a toplist.

Here's the custom toplist template I use (which I made with the toplist generator):

<table>
<!-- BEGIN TOPLIST 11 -->
<CONFIG>links,rand(),49,ascending,catid=12,,7,0,0,0,0</CONFIG>
<td>
<!-- BEGIN REGULAR LINKS -->
<a href="{LINKURL}" {EXTERNALLINKS}>
<!-- BEGIN LINK ATTACHMENTS -->
<img src="thumbnail.php?id={LINKID}&attachid={ATTACHID}" width="100" height="100">
<!-- END LINK ATTACHMENTS -->
</a>
</td>
<!-- END TOPLIST 11 -->
</table>


It work's perfect if I call the template directly by URL:

www.mydomain.com/index.php?...yes&TID=test&usewrapper=no


Now when I use the static file generation I get the following source code:

<table>
<tr>

<td>
<!-- BEGIN REGULAR LINKS -->
<a href="http://www.mydomain.com/{LINKURL}" target="_blank">
<!-- BEGIN LINK ATTACHMENTS -->
<img src="http://www.mydomain.com/thumbnail.php?id=&attachid={ATTACHID}" width="100" height="100"><!-- END LINK ATTACHMENTS -->
</a>
</td>

and so on...


As you can see the variables {LINKURL} and {ATTACHID} are not recognized.

Assuming this problem will be solved, I have a further question regarding the static file generation.
As you can see I don't use {TRACKLINKURL} in the template above because I don't want any single db query in this static file output (for speed reason).
If it would work, I would get the image source like
www.mydomain.com/thumbnail....il.php?id=XXX&attachid=XXX
which is a db query.
So would it be possible to get the image source like
www.mydomain.com/attachment...0ab9e52a1dd8f8ccd5942e.jpg
instead?

Thank you for your help!
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 02, 2006 - 2:43 AM:

Your toplist code doesn't make much sense... you can't have gotten <!-- BEGIN REGULAR LINKS --> from the toplist generator.
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted Jun 02, 2006 - 3:18 AM:

So how do I have to write the code instead?
It's a thumbnail gallery and it works perfect if I call the URL like www.mydomain.com/index.php?...yes&TID=test&usewrapper=no

But it doesn't work with static file generation. Why?

The template looks now:

<table>
<!-- BEGIN TOPLIST 11 -->
<CONFIG>links,rand(),49,ascending,catid=12,,7,0,0,0,0</CONFIG>
<td>
<a href="{LINKURL}" {EXTERNALLINKS}>
<img src="thumbnail.php?id={LINKID}&attachid={LINKATTACHID}" width="100" height="100">
</a>
</td>
<!-- END TOPLIST 11 -->
</table>


What's wrong with it?
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted Jun 02, 2006 - 3:38 AM:

The problem isn't the toplist. The problem is the static file generation of a toplist. Isn't it possible to generate a static file of a toplist?!
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted Jun 02, 2006 - 6:31 AM:

I just figured out that the obove only works if I'm logged in as admin. As guest it doesn't work. So I'm completely confused. I really need a solution for static toplist generation, regardless if you're guest or admin.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 03, 2006 - 2:15 AM:

The new toplist looks valid. Now, have you specified in your usergroup permissions to not allow guests to view your site? If so nothing will be of much use.
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted Jun 04, 2006 - 2:27 AM:

You're right. I try to make a static toplist of links from a category visible only for members. But I need the toplist to include on another site. Is it possible to disable this user group check for static file generation? Or do you know a workaround for this?
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted Jun 06, 2006 - 7:45 AM:

Any help would be very appreciated.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 07, 2006 - 4:47 PM:

There's no method, and it doesn't really make any sense either since there's no point in restricting the category if you're going to make a static page of it available (thus automatically letting people see it, since static pages don't have dynamic options like usergroups).
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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