Dog Cow wrote: |
JLA wrote: |
Need the ID returned to a variable in the viewtopic body template
Any ideas? |
So you want to show an attachment (picture, I presume?) on every page of a topic?
Well, I'd suggest making a new column in the topics table to store the attach_id, but first you need to get it.
I suggest cheating. We will assume that someone will eventually look at the first page of a topic. I would suggest intercepting the $attachments array when $start = 0, and grabbing the first element. That should be the first attachment of the first post of the topic. You can then store this attach_id in the topic's row in the topics table, if the existing value was non-zero. |