PDA

View Full Version : Solved custom template homepage links



MOGmartin
15-09-10, 12:36
Hi,

I have had to create a custom template from scratch (my board is highly customised).

All is working fine, apart from when a user follows a link to a sub-language, the links to the MAIN language (ie. domain.com) are updated to be the homepage of THAT language, (ie. domain.com/es/).

How can I override the rewriting of a specific link so that I can maintain the link to the original language (english), while keeping the main site logo using the new link to the country specific homepage?

thanks

MOGmartin

MOGmartin
15-09-10, 13:02
if you need an example,

1) please go to my board @ MOGmartin's SEO Forum, FREE SEO Tools & SEO Blog @seoforums.org (http://tiny.cc/ipq4y)
2) click onto another language
3) click BACK to english (the first flag).

I need to set that link to go to just the homepage of the main site.

thanks

vBET
15-09-10, 15:49
I see it. What changes did you made in vBET template for flags generation. Also - did you made any vBET code changes?

MOGmartin
15-09-10, 16:54
I see it. What changes did you made in vBET template for flags generation. Also - did you made any vBET code changes?

no changes at all, I just created a hard coded template in html with the languages I wanted, and pointed them at the correct directory:

ie. spanish flag = link to /es/
french flag = link to /fr/

no logic is used.

MOGmartin
16-09-10, 12:20
no changes at all, I just created a hard coded template in html with the languages I wanted, and pointed them at the correct directory:

ie. spanish flag = link to /es/
french flag = link to /fr/

no logic is used.

anything? bump?? help???

etc.

vBET
16-09-10, 15:51
no changes at all, I just created a hard coded template in html with the languages I wanted, and pointed them at the correct directory:

ie. spanish flag = link to /es/
french flag = link to /fr/

no logic is used.

So you changed completely the way of flags generation. Please note that vBET generates flags URL's normally for not translated pages and for translated pages uses there prefix vbet_flag- which is removed during translation tracking (to recognize your flags links and not add there language code). You changed it and that is why your flag has added language code.

So please return to vBET template and modify it if you need, or in your code check does exist $_REQUEST['language'] and in this case add vbet_flag- at the beginning of flag URL (not the image - link around image).

MOGmartin
16-09-10, 16:29
So you changed completely the way of flags generation. Please note that vBET generates flags URL's normally for not translated pages and for translated pages uses there prefix vbet_flag- which is removed during translation tracking (to recognize your flags links and not add there language code). You changed it and that is why your flag has added language code.

So please return to vBET template and modify it if you need, or in your code check does exist $_REQUEST['language'] and in this case add vbet_flag- at the beginning of flag URL (not the image - link around image).

Hi, thanks for the response.

I took a look at your code last night, couldnt work out how to adapt it... guess I will dive in again.

the problem with your default template is that for some reason all of the heights and widths are set to zero, so the flags just appear as dots.

do you know why this is?

thanks!

Martin

MOGmartin
16-09-10, 16:42
edited above post to include problem with default templates,

the html I currently see is height="0" and width="0" on all flags.... ??

MOGmartin
16-09-10, 16:52
OK - found the problem.

you are using clear.gif as the link filename, this conflicts with clear.gif that vb uses as well.

I have fully setup all image size attributes in vbseo, so it creates this conflict.

I recommend you change the name of clear.gif in a future release.

vBET
16-09-10, 19:08
edited above post to include problem with default templates,

the html I currently see is height="0" and width="0" on all flags.... ??

Width and height are hard-coded as numbers: width="16" height="11"
So it cannot be vBET fault - maybe some other mod is parsing your images.

vBET
16-09-10, 19:11
OK - found the problem.

you are using clear.gif as the link filename, this conflicts with clear.gif that vb uses as well.

I have fully setup all image size attributes in vbseo, so it creates this conflict.

I recommend you change the name of clear.gif in a future release.

There is no conflict, because out clear.gif is in other directory. So path are completely different. Image is determine by it's full path in browser not just by name. So please try to configure your vbseo using more that just image name :)

As I understand the issue is solved. Do you need more assist here? :)

MOGmartin
17-09-10, 09:24
There is no conflict, because out clear.gif is in other directory. So path are completely different. Image is determine by it's full path in browser not just by name. So please try to configure your vbseo using more that just image name :)

As I understand the issue is solved. Do you need more assist here? :)

nope, Im done, thanks!

(check out the integration by the way, MOGmartin's SEO Forum, FREE SEO Tools & SEO Blog @seoforums.org (http://seoforums.org) )

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Languages translations supported by vBET 4.9.99