Gossamer Forum
Home : Products : Gossamer Links : Discussions :

more than one URL per entry

Quote Reply
more than one URL per entry
Hi,
As already mentioned I'm working on a portal that comes in three languages.

I've added all the additional fields like title_en/title_de and description_en/description_de. that's everything fine.

Beside I have also added URL_en and URL_de as it should be possible that a user enters a specific URL from his homepage for every language.

Problem is, that somehow only the URL that is written in the original URL field is parsed by the script and i can not display the others.
I could of course display them by <%URL_en%> but i want them to be counted like they normally are.

Hopefully you have some hints for me.

Greetings

Last edited by:

Jagerman: Apr 7, 2006, 5:54 PM
Quote Reply
Re: [lapinkulta] more than one URL per entry In reply to
How about usign this kinda thing in link.html, so it gives them the option of all thew languages;

<%Title%> [en] [de] [other]

Then have the pages in [] linked appropriatly with the correct URL tag.

Hope that helps.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] more than one URL per entry In reply to
yes, that's clear and that's what I'm doing and it is working fine for the titles, descriton etc.

But the links are in link.html like that:
<a class="category_links" target="_blank" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>">

but db_cgi_url is only the original URL field of the database. I want the URL_en and URL_de field also integrated like that (so that clicks are counted).

Last edited by:

Jagerman: Apr 7, 2006, 5:54 PM
Quote Reply
Re: [lapinkulta] more than one URL per entry In reply to
Are the pages being dynamically made (i.e with page.cgi), and do you have a 'language' filed in your users profile? If so, it may be possbile to write a global, that will return a new global, to display the appropriate URL for the logged in user. Obviously EVERYONE will have to be logged in for this feature to work.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [lapinkulta] more than one URL per entry In reply to
You would need to rewrite some code (or better: make a plugin). If you know perl it would be quite easy to do (have a look at admin/Links/User/Jump.pm).

The implementation would also depend on whether you want to count hits to the different URL's separately, or if you just want to count all the hits of a link in total (the latter is much easier).

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] more than one URL per entry In reply to
yes, i have a language field (multiple_select) which can be en, de or hu or some or all of them. displaying the entries, based on the language selection works fine, just the stuff with the URL.

i agree with yogi that i would need a plugin, i just don't know about perl at all. are there people out there making custom plugins at reasonable prices? of course it would be great to count each language seperately and than have a total sum also.

Last edited by:

Jagerman: Apr 7, 2006, 5:54 PM
Quote Reply
Re: [lapinkulta] more than one URL per entry In reply to
Hi,

Yogi is right. It's going to take a change to the Jump.pm, or a plugin that overrides Jump.pm to accomplish what you want. The alternative is to lose the hit counting, and just put the URL tags in directly to link.html.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] more than one URL per entry In reply to
thank you.
I just got the idea, that the following might be possible.

If the link is called like with an additional value for the language like <%db_cgi_url%>/jump.cgi?ID=<%ID%>&<%URL_en%>

Like this you can use as many different URL as you like, as long as jump.pm know how to handle.

How much reprogramming would that be? Should I post that in the custom jobs section?

Last edited by:

Jagerman: Apr 7, 2006, 5:55 PM
Quote Reply
Re: [lapinkulta] more than one URL per entry In reply to
Hi,

Jump.cgi has always been my favorite program to modify :)

It's not hard at all to get it to jump to different places, or do things differently.

You need to make a little change to the fetch record procedure to get the information you need, and you'd need to make some changes to hit counting if you wanted to record the number of hits to the english/etc pages separately, but it's not a major hack, or requires any major changes to links.

Most likely, as long as you keep a copy of the changes, it would survive upgrades, as most of my changes have survived from version 1.0 to 2.1.1 with only changes that were to Links as a whole, not to the specifics of fetch/display code (links changed a lot internally in some versions).


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.