Webmastersite.net
Register Log In

toplists in textareas

Comments on toplists in textareas

david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Aug 28, 2008 - 9:36 AM:

Hi Paul,

If you put a toplist in the textarea of the static file generation part in the admin panel, it literally changes the domain root folder permission to 666. It does this, because at the end of a toplist, there is a blank row. Here is my toplist:

<!-- BEGIN TOPLIST 47 -->
<CONFIG>links,id,999999,ascending,,,,0,1,0,0,0,1,,1</CONFIG>listazasok/{LINKID}_HUN.html<!-- END TOPLIST 47 -->


As you can see, I already had to eliminate all spaces, so that the output doesn't contain line-breaks. However, at the end of the toplist, there are 2 things which shouldn't really be there:
1. the
<!-- END TOPLIST 47 -->

2. a blank row

Any way to get rid of them?

Thanks
David
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 28, 2008 - 11:40 AM:

The static file export page has no relation whatsoever to toplists, so I'll guess you're actually talking about the javascript export page.The javascript export page asks for a toplist config line. That's one line, not two lines, not three lines. It's the line that starts with <CONFIG> and ends with </CONFIG>.

Here is my toplist:

That isn't a legal toplist since the config line has been crammed full of other stuff, leaving no other lines.
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Aug 28, 2008 - 11:55 AM:

Hi Paul,

This would create even more line breaks:

<!-- BEGIN TOPLIST 47 -->
<CONFIG>links,id,999999,ascending,,,,0,1,0,0,0,1,,1</CONFIG>
listazasok/{LINKID}_HUN.html
<!-- END TOPLIST 47 -->


Heck, if I put the above into an empty TPL and call it on the site without an wrapper, and look at the page source, the mentioned problems are present there as well. Granted, they don't matter, since the browser displays everything fine, but the END TOPLIST for example, is still there. See what I mean now?

I was talking about the static file generation, not the javascript export page. I am not trying to generate a toplist, but generate static pages, based on a toplist of links. So for each link I have in the toplist, I want a link specific page generated.

The static file generator DOES work for this, and does it fine, ONLY IF I remove the last blank row in the textarea after the toplist in it. I looked at the TOPLIST entries in the PHP files, but no idea which of them is responsible for creating a linebreak at the end of a toplist.

David
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Aug 28, 2008 - 1:43 PM:

Never mind. smiling face This works:


<textarea name="staticexportnamelist" rows="5" cols="80">
<!-- BEGIN TOPLIST 47 --><CONFIG>links,id,999999,ascending,lastedit > {TIME} - 86400,,,0,1,0,0,0,1,,1</CONFIG>
listazasok/{LINKID}_HUN.html
listazasok/{LINKID}_ENG.html<!-- END TOPLIST 47 --></textarea>


There cannot be a line-break between the END TOPLIST and the closing textarea tag. All is good. smiling face
The reason why I wanted this: I am building a real-estate site, where each property has a TON of attributes. So to speed up the site, I generate a static html of the attributes for each property that has been edited within the last hour.

David
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 30, 2008 - 5:16 PM:

I would not expect a toplist inside a <textarea> tag to work right, since it's not designed for that and is likely to leave HTML artifacts.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 31, 2008 - 12:14 PM:

Added a cleanup to allow toplists to be used in textareas.
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Sep 05, 2008 - 1:26 PM:

after upgrade to 5.0.3, the static file generator doesn't work again. the closing tags for the toplists are gone now, but I get this error:


Query 6: SELECT `name`,`content` FROM wsnlinks_settings WHERE type='special'

Load time so far: 0.1 seconds.

Number of rows is 15

Query 7: SELECT `name`,`content` FROM wsnlinks_settings WHERE type='special'

Load time so far: 0.1 seconds.

Number of rows is 15

Query 8: SELECT `name`,`content` FROM wsnlinks_settings WHERE type is NULL OR type != 'special'

Load time so far: 0.1 seconds.

Number of rows is 461

Query 9: SELECT `name`,`content` FROM wsnlinks_settings WHERE type='special'

Load time so far: 0.11 seconds.

Number of rows is 15

Load time so far: 0.12 seconds.

Query 10: UPDATE wsnlinks_settings SET content='http://cccc.com/index.php?custom=yes&TID=g_sidebar_searchHUN&usewrapper=no ccccc.com/index.php?custom=...ar_searchENG&usewrapper=no ' WHERE name='staticexporturllist'

Load time so far: 0.12 seconds.

Query 11: UPDATE wsnlinks_settings SET content='templates/multilingual/custom/sidebar_searchHUN.tpl templates/multilingual/custom/sidebar_searchENG.tpl ' WHERE name='staticexportnamelist'

An error occoured at ccccc.com/admin/prefs.php?s...hp?section=static&filled=1 on 2008-09-05 18:24:38. Please relay this data to support. Error #2: 'fopen(../) [function.fopen]: failed to open stream: Is a directory' in /home/cccc/public_html/cventura/includes/filefunctions.php on line 556.

An error occoured at http://ccc.com/admin/prefs.php?section=static&filled=1 on 2008-09-05 18:24:38. Please relay this data to support. Error #2: 'fwrite(): supplied argument is not a valid stream resource' in /home/ccccc/public_html/cventura/includes/filefunctions.php on line 556.

An error occoured at http://ccc.com/admin/prefs.php?section=static&filled=1 on 2008-09-05 18:24:38. Please relay this data to support. Error #2: 'fclose(): supplied argument is not a valid stream resource' in /home/ccccc/public_html/cventura/includes/filefunctions.php on line 559.

Load time so far: 0.66 seconds.

Query 12: UPDATE wsnlinks_settings SET content='../styles/default' WHERE name='stylesheet'

Load time so far: 0.66 seconds.

Query 13: UPDATE wsnlinks_settings SET content='templates/multilingual' WHERE name='templatesdir'

An error occoured at http://ccc.com/admin/prefs.php?section=static&filled=1 on 2008-09-05 18:24:38. Please relay this data to support. Error #2: 'require(adminend.php) [function.require]: failed to open stream: Permission denied' in /home/ccccc/public_html/cventura/admin/prefs.php on line 614.

An error occoured at http://ccc.com/admin/prefs.php?section=static&filled=1 on 2008-09-05 18:24:38. Please relay this data to support. Error #2: 'require(adminend.php) [function.require]: failed to open stream: Permission denied' in /home/ccccc/public_html/cventura/admin/prefs.php on line 614.
Fatal error: require() [function.require]: Failed opening required 'adminend.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ccccc/public_html/cventura/admin/prefs.php on line 614


and i get my root folder chmoded to 666 automatically for some reason.

David
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Sep 05, 2008 - 2:12 PM:

figured it out. there cannot be a blank last row in the textareas at all in the static file generator page.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 09, 2008 - 8:50 AM:

Trimming out blank lines now.
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.