Webmastersite.net
Register Log In

PM attachment problems
may i'm doing it wrong

Comments on PM attachment problems

Jumpin Jack


Usergroup: Customer
Joined: Jan 13, 2005

Total Topics: 23
Total Comments: 50
Posted Feb 12, 2006 - 2:07 PM:

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
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 13, 2006 - 4:28 AM:

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


Usergroup: Customer
Joined: Jan 13, 2005

Total Topics: 23
Total Comments: 50
Posted Feb 13, 2006 - 8:32 AM:

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
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 13, 2006 - 11:02 PM:

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


Usergroup: Customer
Joined: Jan 13, 2005

Total Topics: 23
Total Comments: 50
Posted Feb 25, 2006 - 10:12 PM:

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
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 01, 2006 - 7:53 PM:

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?
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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