WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums


PM attachment problems
may i'm doing it wrong

Version: 2.3
printPrint


PM attachment problems
Jumpin Jack
Member

Usergroup: Customer
Joined: Jan 13, 2005
Total Topics: 21
Total Posts: 47
Posted 02/12/06 - 12:07 PM:
quote post
#1
Paul,

Here is the toplist I created for viewprofile.tpl

<!-- BEGIN TOPLIST 13 -->
<CONFIG>attachments,id,50,ascending,memberid = {MEMBERID},,2,0,0,0,0</CONFIG>
<IF {IMAGEVALIDATED} is 1>
<img src="{IMAGETHUMBURL}" alt="{MEMBERANME}" border="0" />
</IF>
<!-- END TOPLIST 13 -->

The output works fine but if a member has sent an attachment through PM the profile page no longer loads for that member; other members profile pages still display correctly. I get Parse error: syntax error, unexpected '{' in commonfuncs.php(477) : eval()'d code on line 404

I tried to this config line
<CONFIG>attachments,id,50,ascending,memberid = {MEMBERID} and pmid < 1,,2,0,0,0,0</CONFIG>

but this doesnt yield the correct output.

Is there a way to get a list of all the validated photos(attachments) a member has submitted excluding to PM attached files?
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 02/13/06 - 02:28 AM:
quote post
#2
The problem is that your conditional is nonsense since you use {IMAGE in a place that's not within the scope of images -- you're doing an attachments toplist, so you're only entitled to use {ATTACH variables.

Why are you using a conditional there instead of just setting the toplist to, as it does by default, only include validated items?
Jumpin Jack
Member

Usergroup: Customer
Joined: Jan 13, 2005
Total Topics: 21
Total Posts: 47
Posted 02/13/06 - 06:32 AM:
quote post
#3
In the docs the only variables for attachments are under Images

If I dont put <IF {IMAGEVALIDATED} is 1> it shows all the attachments that have been uploaded even though they are not validated. All attachment validated items are set to 1 as soon as they are uploaded.

I got it to work I made the config line
<CONFIG>attachments,id,50,ascending,memberid = {MEMBERID} and type = "link",,2,0,0,0,0</CONFIG>
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 02/13/06 - 09:02 PM:
quote post
#4
You must not be requiring validation of attachments.

Anyhow attachment variables are used in details.tpl though they don't seem to be documented.
Jumpin Jack
Member

Usergroup: Customer
Joined: Jan 13, 2005
Total Topics: 21
Total Posts: 47
Posted 02/25/06 - 08:12 PM:
quote post
#5
Trying something with these attachments and I noticed that download.php?attachid={ATTACHID} doesn't show any images. I get with a fresh install too
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 03/01/06 - 05:53 PM:
quote post
#6
Thumbnails work with just an attachid, downloads require that the associate item's number be passed as well. Changed it to allow it to be underspecified for downloads too in next release.

Edit: Also, are you sure that's a PM attachments toplist?

Edited by Paul on 03/01/06 - 06:01 PM
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.