Hi,
I'm working on a page where a like to put some of the "global tasks" into small icons in the top-graphich.
It works fine for the most of it, but not the printpage function.
You can see it here: http://www.bmail.dk/worlddance08
I have found a post in the old forum, that talks about (almost) same problem. See here
But there are at least three ways to implement the link:
1. The textlink used in most templates (called sa a <?php echo printlink();?>)
2. The URL with a post-extensioncode (calles as ?&print)
3. As a image linked in a "map" (called like this: <area href="?&sitemap" alt="Sitemap" shape="rect" coords="656, 8, 677, 28">
I want to use the number 3. but it works only for the sitemap (since there is only one sitemap)
When I use ?=print it will always call the frontpage and only the frontpage....
Anyone who have a suggestion for a work-around this?
Greetings,
Mads
Using imagemap for a link to printpage-funkction
Re: Using imagemap for a link to printpage-funkction
I made a smalll function for myself that I included in functions.php:
Then you could use the following code in your template:
Code: Select all
// Printgraphic: Print with a graphic link
function printgraphic($graphic){global $f,$search,$file,$sn,$su,$tx,$pth;$t='&print';if($f=='search')$t.='&f=search&search='.$search;else if($f=='file')$t.='&file='.$file;else if($f!=''&&$f!='save')$t.='&'.$f;return '<a href="'.$sn.'?'.$su.$t.'" class="menu">'.'<img class="printgraphic" src="'.$pth['folder']['templateimages'].$graphic.'" border="0" alt="'.$tx['template']['print'].'" title="'.$tx['template']['print'].'">'.'</a>';}
Code: Select all
<?=printgraphic('mypic.gif');?>
Re: Using imagemap for a link to printpage-funkction
Ok, I see your idea johndoe.
But this will still be a solution nr 4, not nr. 3 that I want. As an imagemap.
Its not a independent graphic that I use for the printicon, but a 'hotspot'-hyperlink in the topbanner.
I works fine with links to contact page, sitemap etc. Only the 'Printpage' does'nt do the work...
Please take a look: http://www.bmail.dk/worlddance08 (Upper left corner)
This is my imagemap code from my template:
Get my point?
Mads
But this will still be a solution nr 4, not nr. 3 that I want. As an imagemap.
Its not a independent graphic that I use for the printicon, but a 'hotspot'-hyperlink in the topbanner.
I works fine with links to contact page, sitemap etc. Only the 'Printpage' does'nt do the work...
Please take a look: http://www.bmail.dk/worlddance08 (Upper left corner)
This is my imagemap code from my template:
Code: Select all
<map name="m_template_r1_c1" id="m_template_r1_c1">
<area href="index.php" target="_self" alt="Velkommen til Worlddance" shape="rect" coords="6, 6, 549, 93">
<area href="?&print" alt="Printvenlig version _virker ikke pt_" shape="rect" coords="765, 8, 784, 28">
<area href="?Kontakt:Links" alt="Links til samarbejdspartnere" coords="737, 9, 757, 28">
<area href="?Kontakt" alt="Kontakt Worlddance" shape="rect" coords="711, 9, 731, 26">
<area href="index.php" alt="Worlddance.dk startside" shape="rect" coords="684, 9, 704, 29">
<area href="?&sitemap" alt="Overblik over worlddance.dk" shape="rect" coords="656, 8, 677, 28">
</map>
Mads
Re: Using imagemap for a link to printpage-funkction
For your printlink, did you ever try something like
(for cmsimple variables refer to http://www.cmsimple.com/?Developer%27s_ ... _functions) or just download one of the free templates from the resellers, there are several of where the links are displayed by graphics.
regards
manu
Code: Select all
....href="?<?echo $su;?>&print"...
regards
manu
Re: Using imagemap for a link to printpage-funkction
Hi manu;
Thanks a lot, that was exactly the hint I was looking for!Did the work!
Thanks a lot, that was exactly the hint I was looking for!
Code: Select all
....href="?<?echo $su;?>&print"...