Hi all, Sue.
Is there anyway to have alt=”{filename}” replaced by alt=”{topic_title}” in a photo attachment to a forum thread?
Thank you.
ps. I am using the latest version of EE and EE-Forum
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 13, 2008 6:00am
Subscribe [1]#1 / Mar 13, 2008 6:00am
Hi all, Sue.
Is there anyway to have alt=”{filename}” replaced by alt=”{topic_title}” in a photo attachment to a forum thread?
Thank you.
ps. I am using the latest version of EE and EE-Forum
#2 / Mar 13, 2008 10:22am
In ‘Thread View’- ‘Image Attachments’- what do you get when you edit to match the above?
#3 / Mar 13, 2008 10:41am
just {topic_title}
#4 / Mar 13, 2008 11:02am
Looks like it’s not parsed in that template. MIGHT could do it with php parsed on output- but I’m not dead sure how the parsing works there. And I imagine you might run into more trouble than it’s worth. If you want me to break this off to ‘How to’ and give you some php suggestions, I can. Might be simple. Or it might not.
#5 / Mar 13, 2008 11:08am
Yeah sure. Thanx.
#6 / Mar 13, 2008 11:26am
Done- and… we can give this a try. Turn php parsing on, parsed on output- in the thread view, let’s set a variable based on the topic title
<?php
$ttitle = '{topic_title}';
?>Then in the image attachment template, let’s just see if it works
<?php
echo 'Topic title: '.$ttitle;
?>May/may not.
#7 / Mar 13, 2008 12:27pm
I will try it asap.
#8 / Mar 14, 2008 1:39pm
Sorry, not parsing…