logo for each link

logo for each link

Postby snowmaker on Wed Feb 18, 2004 12:12 pm

i think it would be nice if in each link can have a logo.

thx a lot.
snowmaker
 

Re: logo for each link

Postby ichbins on Wed Feb 18, 2004 3:43 pm

snowmaker wrote:i think it would be nice if in each link can have a logo.


What exactly do you mean?

Markus
ichbins
 
Posts: 26
Joined: Wed Sep 10, 2003 5:50 am

Re: logo for each link

Postby Snowmaker on Wed Feb 18, 2004 9:25 pm

ichbins wrote:
snowmaker wrote:i think it would be nice if in each link can have a logo.


What exactly do you mean?

Markus


I just want to put a logo for each link in "My Links" .
sorry.. my poor english.


thx
Snowmaker
 

Postby ichbins on Thu Feb 19, 2004 2:18 am

Well I think there is a solution, though this is no "real funktion" of pLog, but it works:

-Create a folder anywhere in your site structure.
-Name the folder "linklogos"
-Put the wanted logo into the folder
-Now you can insert the following code on the "edit_link"-page instead of the name of the link:

<img src="http://www.path_to_your_homepage/linklogos/the_logo.gif" border="0" />

Everything should work, but maybe you will not be able to edit this link, cause the adress of the logo will be rendered wrong on the "edit_link"-page. So, if you want to change the link, you maybe have to delete it and create a new one.

greetinx,
Markus
ichbins
 
Posts: 26
Joined: Wed Sep 10, 2003 5:50 am

Postby phunkphorce on Thu Feb 19, 2004 3:39 am

Another idea is that every link has three fields: the url of the link itself (mandatory), its name (mandatory) and an optional field with a description. You could use that third field to write there a url where the logo can be found and then change a little of template code, the part where the user links are printed out. If you are using the 'grey' template, have a look at templates/grey/footer.template.

The original code that prints a list with the links is this:
Code: Select all
  <p>
   {foreach from=$mylinks item=link}
    <a target="_blank" title="{$link->getDescription()}" href="{$link->getUrl()}">{$link->getName()}</a><br/>
   {/foreach}
  </p>


You should change it to make it look like:

Code: Select all
  <p>
   {foreach from=$mylinks item=link}
     <a target="_blank" href="{$link->getUrl()}">
       <img src="{$link->getDescription()}" border="0" alt="Logo" />
      {$link->getName()}
     </a><br/>
   {/foreach}
  </p>


As you can see, the source url of the image is specified in the description field ot the link. It should work :)

Oscar
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby Guest on Thu Feb 19, 2004 3:46 am

that is, of course, the more elegant way...
Guest
 


Return to Requests and Suggestions

cron