PDA

View Full Version : Make Abstract Image clickable


boccio
10-19-2006, 01:15 PM
To have Abstract Image of an article clickable (on home page, or category pages) do the following:

HTML_function.php
1. On line 1023, after the closing bracket '}', add this line of code

$article->link = $link;
2. After line 1578 add '{LINK}' just after the '{IMAGE}',

'{IMAGE}',
'{LINK}'
3. After line 1592 add $article->link after $article->Image,

$article->Image,
$article->link

index.php
1. On lines 231 and 399 add '/{LINK}/' on both places just after '/{IMAGE}/',

'/{IMAGE}/',
'/{LINK}/'

2. On lines 244 and 412 add $article->link just after $article->Image,


$article->Image,
$article->link


article_Short.tpl
Add link to the image tag, like this (underlined is what you need to add):

<div class="plainTxt"><a href="{LINK}"><img src="{ROOT}files/{IMAGE}" alt="image" align="left" border="0" style="padding-right: 5px;" /></a>{BODY} </div>

Elton
11-07-2006, 05:06 PM
I'll give this a go tomorrow.

Many thanks for taking the time to produce it, Boccio.

mateng
12-31-2006, 09:55 PM
i have changed my HTML_function.php file before so it doesnt match above code changing.

Can you rewrite the solition by using not line number and using befor code or after code type.

I hope u understand me, i couldn explain cos of my bad english, i am giving an example....

add

$article->link = $link;

after


$link=$url."files/".$article->Document;
$link_name=$lang['LNG_READ_DOCUMENT'];
break;
}
$articleLink="<a href=\"{$link}\">{$link_name}</a>";

return $articleLink;
}

like that.

chatfan
03-11-2007, 01:53 AM
This does not seem to match the HTML_function.php I got? What release is this for? Using 3.4 dev.

Micha
03-11-2007, 11:20 AM
This is for v3.25, in v3.4 abstract image is clickable by default.

chatfan
03-11-2007, 12:36 PM
Oh lol, no wonder I found all the tags already in place.
Also found I am looking in the wrong place, actually trying to get the category images clickable.

Using the box category headers as a main link to the news sections and would like to have the category images clickable. Is this easy to do?

Micha
03-12-2007, 09:05 AM
To make category image clickable you need to edit show_category_headers.tpl and just move this <a href="{CATEGORY_LINK}"> before {IMAGE} tag.
The code would look like this:
<a href="{CATEGORY_LINK}">{IMAGE} {CATEGORY_NAME}</a>

chatfan
03-12-2007, 01:07 PM
Oh.. Duh I guess, almost to obvious. Now I need to find a way to get rid of the image outline.

Added a outline-style and border stuff to the stylesheet but no luck so far.

Micha
03-12-2007, 01:21 PM
Try to add border none to .topNews_category img class.
Something like this:

.topNews_category img { vertical-align: middle; border:none;}

This works fine for me. :)

chatfan
03-12-2007, 06:26 PM
Right, Thanks! Was editing the wrong .topNews_category class, completely missed the img version. Just figured out how CSS works a couple of days ago so expect more questions aksing for the obvious :)

Anyway so far so good.