Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: problems with flag code

  1. #1
    rapidspider1 is offline Newbie Net Builder
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts

    problems with flag code

    have a look at the page below

    The Guest Room

    the translate script work as i tested it our on an empty page you can see that here:
    Pagina nueva 1

    however when i place it in my script i get he flags and all but when you go over a flag or click on it

    i still get the code instead of changing it to the current page
    http://www.tgroom.com/lang/de<?php echo $_SERVER[

    code:
    <body><!-- google_ad_section_start(weight=ignore) -->
    <table width="100%" align="center">
    <tr>
    <td><a href="/lang/en<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/us.gif"

    alt="English"></a> </td>
    <td><a href="/lang/de<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/de.gif" alt="German"></a>

    </td>
    <td><a href="/lang/es<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/es.gif"

    alt="Spanish"></a> </td>
    <td><a href="/lang/fr<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/fr.gif" alt="French"></a>

    </td>
    <td><a href="/lang/it<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/it.gif"

    alt="Italian"></a> </td>
    <td><a href="/lang/pt<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/pt.gif"

    alt="Portuguese"></a> </td>
    <td><a href="/lang/ru<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/ru.gif"

    alt="Russian"></a> </td>
    </tr>

    </table>

    <!-- google_ad_section_end -->Have you ever dreamed of investing in properties around the world, which
    are still in development and low in price?
    {include file="header.tpl"}
    maybe i'am stupid but i'am not so familiar with php

  2. #2
    Aziz's Avatar
    Aziz is offline no investment, no glory
    Join Date
    May 2009
    Location
    IL
    Posts
    736
    Thanks
    588
    Thanked 243 Times in 168 Posts
    the code seems right but are you sure you can add PHP codes to template files?

  3. Thanked by:

    rapidspider1 (25 April, 2010)

  4. #3
    rapidspider1 is offline Newbie Net Builder
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Aziz View Post
    the code seems right but are you sure you can add PHP codes to template files?
    thank you for the reply

    i'am not sure about that, however in which php files i should at it otherwise index.php?
    or is there another code?

  5. #4
    Aziz's Avatar
    Aziz is offline no investment, no glory
    Join Date
    May 2009
    Location
    IL
    Posts
    736
    Thanks
    588
    Thanked 243 Times in 168 Posts
    try testing php functionality.

    add this line and check if you see the word "hello"

    PHP Code:
    <?php echo "hello"?>

  6. Thanked by:

    rapidspider1 (25 April, 2010)

  7. #5
    rapidspider1 is offline Newbie Net Builder
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Aziz View Post
    try testing php functionality.

    add this line and check if you see the word "hello"

    PHP Code:
    <?php echo "hello"?>
    i placed this in a tpl file but i did not see anything.

  8. #6
    Aziz's Avatar
    Aziz is offline no investment, no glory
    Join Date
    May 2009
    Location
    IL
    Posts
    736
    Thanks
    588
    Thanked 243 Times in 168 Posts
    hmm. let's try something else..

    find the following:

    PHP Code:
    <body><!-- google_ad_section_start(weight=ignore) -->
    <table width="100%" align="center">
    <tr>
    <td><a href="/lang/en<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/us.gif"

    alt="English"></a> </td>
    <td><a href="/lang/de<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/de.gif" alt="German"></a>

    </td>
    <td><a href="/lang/es<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/es.gif"

    alt="Spanish"></a> </td>
    <td><a href="/lang/fr<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/fr.gif" alt="French"></a>

    </td>
    <td><a href="/lang/it<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/it.gif"

    alt="Italian"></a> </td>
    <td><a href="/lang/pt<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/pt.gif"

    alt="Portuguese"></a> </td>
    <td><a href="/lang/ru<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/ru.gif"

    alt="Russian"></a> </td>
    </tr>

    </table>

    <!-- google_ad_section_end -->Have you ever dreamed of investing in properties around the world, which
    are still in development and low in price?
    {include file="header.tpl"}
    replace with:


    PHP Code:
    <body>
    {include 
    file="flags.php"}
    {include 
    file="header.tpl"
    now create a new file named flags.php and place it in the same directory as header.tpl

    add the following code to the file:

    PHP Code:

    <!-- google_ad_section_start(weight=ignore) -->
    <table width="100%" align="center">
    <tr>
    <td><a href="/lang/en<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/us.gif"

    alt="English"></a> </td>
    <td><a href="/lang/de<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/de.gif" alt="German"></a>

    </td>
    <td><a href="/lang/es<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/es.gif"

    alt="Spanish"></a> </td>
    <td><a href="/lang/fr<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/fr.gif" alt="French"></a>

    </td>
    <td><a href="/lang/it<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/it.gif"

    alt="Italian"></a> </td>
    <td><a href="/lang/pt<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/pt.gif"

    alt="Portuguese"></a> </td>
    <td><a href="/lang/ru<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/ru.gif"

    alt="Russian"></a> </td>
    </tr>

    </table>

    <!-- google_ad_section_end -->Have you ever dreamed of investing in properties around the world, which
    are still in development and low in price?
    logically it should fix the problem. give it a try and let me know what happens!

  9. Thanked by:

    rapidspider1 (25 April, 2010)

  10. #7
    rapidspider1 is offline Newbie Net Builder
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Aziz View Post
    hmm. let's try something else..

    find the following:

    PHP Code:
    <body><!-- google_ad_section_start(weight=ignore) -->
    <table width="100%" align="center">
    <tr>
    <td><a href="/lang/en<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/us.gif"

    alt="English"></a> </td>
    <td><a href="/lang/de<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/de.gif" alt="German"></a>

    </td>
    <td><a href="/lang/es<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/es.gif"

    alt="Spanish"></a> </td>
    <td><a href="/lang/fr<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/fr.gif" alt="French"></a>

    </td>
    <td><a href="/lang/it<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/it.gif"

    alt="Italian"></a> </td>
    <td><a href="/lang/pt<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/pt.gif"

    alt="Portuguese"></a> </td>
    <td><a href="/lang/ru<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/ru.gif"

    alt="Russian"></a> </td>
    </tr>

    </table>

    <!-- google_ad_section_end -->Have you ever dreamed of investing in properties around the world, which
    are still in development and low in price?
    {include file="header.tpl"}
    replace with:


    PHP Code:
    <body>
    {include 
    file="flags.php"}
    {include 
    file="header.tpl"
    now create a new file named flags.php and place it in the same directory as header.tpl

    add the following code to the file:

    PHP Code:

    <!-- google_ad_section_start(weight=ignore) -->
    <table width="100%" align="center">
    <tr>
    <td><a href="/lang/en<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/us.gif"

    alt="English"></a> </td>
    <td><a href="/lang/de<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/de.gif" alt="German"></a>

    </td>
    <td><a href="/lang/es<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/es.gif"

    alt="Spanish"></a> </td>
    <td><a href="/lang/fr<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/fr.gif" alt="French"></a>

    </td>
    <td><a href="/lang/it<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/it.gif"

    alt="Italian"></a> </td>
    <td><a href="/lang/pt<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/pt.gif"

    alt="Portuguese"></a> </td>
    <td><a href="/lang/ru<?php echo $_SERVER["REQUEST_URI"]?><img src="/translate/graphics/ru.gif"

    alt="Russian"></a> </td>
    </tr>

    </table>

    <!-- google_ad_section_end -->Have you ever dreamed of investing in properties around the world, which
    are still in development and low in price?
    logically it should fix the problem. give it a try and let me know happens!
    first of all thanks for your help so far, i tried it but it stays the same i placed the flag.php in the templates directory like where the other file is placed. but no results as you can see yourself. i have to go now b ut i will certainly check back and try it over again when i have more time

    thank you!

  11. #8
    Aziz's Avatar
    Aziz is offline no investment, no glory
    Join Date
    May 2009
    Location
    IL
    Posts
    736
    Thanks
    588
    Thanked 243 Times in 168 Posts
    I am so sorry! it's my fault. I did not notice that part of the <a> tag is not closed properly. you must have added "> after ?>

    anyway, here's a fixed source, replace everything in flags.php with the following:

    PHP Code:
    <!-- google_ad_section_start(weight=ignore) -->
    <table width="100%" align="center">
      <tr>
        <td><a href="/lang/en<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/us.gif" alt="English"></a></td>
        <td><a href="/lang/de<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/de.gif" alt="German"></a></td>
        <td><a href="/lang/es<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/es.gif"
    alt="Spanish"></a></td>
        <td><a href="/lang/fr<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/fr.gif" alt="French"></a></td>
        <td><a href="/lang/it<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/it.gif"
    alt="Italian"></a></td>
        <td><a href="/lang/pt<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/pt.gif"
    alt="Portuguese"></a></td>
        <td><a href="/lang/ru<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/ru.gif"
    alt="Russian"></a></td>
      </tr>
    </table>
    <!-- google_ad_section_end -->
    <p>Have you ever dreamed of investing in properties around the world, which
    are still in development and low in price?</p>

  12. Thanked by:

    rapidspider1 (25 April, 2010)

  13. #9
    rapidspider1 is offline Newbie Net Builder
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Aziz View Post
    I am so sorry! it's my fault. I did not notice that part of the <a> tag is not closed properly. you must have added "> after ?>

    anyway, here's a fixed source, replace everything in flags.php with the following:

    PHP Code:
    <!-- google_ad_section_start(weight=ignore) -->
    <table width="100%" align="center">
      <tr>
        <td><a href="/lang/en<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/us.gif" alt="English"></a></td>
        <td><a href="/lang/de<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/de.gif" alt="German"></a></td>
        <td><a href="/lang/es<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/es.gif"
    alt="Spanish"></a></td>
        <td><a href="/lang/fr<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/fr.gif" alt="French"></a></td>
        <td><a href="/lang/it<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/it.gif"
    alt="Italian"></a></td>
        <td><a href="/lang/pt<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/pt.gif"
    alt="Portuguese"></a></td>
        <td><a href="/lang/ru<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/ru.gif"
    alt="Russian"></a></td>
      </tr>
    </table>
    <!-- google_ad_section_end -->
    <p>Have you ever dreamed of investing in properties around the world, which
    are still in development and low in price?</p>
    hi,

    no does not work eather seems it only ads the "> before the flag

    P.s: watched your website bookmarked it will maybe have a nice redesign job for you for a website i have, i looked over your portfolio and must say very interesting work you did.

  14. #10
    rapidspider1 is offline Newbie Net Builder
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Aziz View Post
    I am so sorry! it's my fault. I did not notice that part of the <a> tag is not closed properly. you must have added "> after ?>

    anyway, here's a fixed source, replace everything in flags.php with the following:

    PHP Code:
    <!-- google_ad_section_start(weight=ignore) -->
    <table width="100%" align="center">
      <tr>
        <td><a href="/lang/en<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/us.gif" alt="English"></a></td>
        <td><a href="/lang/de<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/de.gif" alt="German"></a></td>
        <td><a href="/lang/es<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/es.gif"
    alt="Spanish"></a></td>
        <td><a href="/lang/fr<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/fr.gif" alt="French"></a></td>
        <td><a href="/lang/it<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/it.gif"
    alt="Italian"></a></td>
        <td><a href="/lang/pt<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/pt.gif"
    alt="Portuguese"></a></td>
        <td><a href="/lang/ru<?php echo $_SERVER["REQUEST_URI"]?>"><img src="/translate/graphics/ru.gif"
    alt="Russian"></a></td>
      </tr>
    </table>
    <!-- google_ad_section_end -->
    <p>Have you ever dreamed of investing in properties around the world, which
    are still in development and low in price?</p>
    anymore suggestions, i was so happy that i got the script to work to translate, now this

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 13 February, 2011, 13:45 PM
  2. (Resource) Flag Counter do you use it ?
    By StephenM in forum Community Software
    Replies: 1
    Last Post: 30 June, 2010, 15:00 PM
  3. Adsense problems....
    By photoworldblog in forum Web Proxies
    Replies: 14
    Last Post: 26 August, 2009, 23:12 PM
  4. Put a flag counter on your site or blog
    By DotComBum in forum Business
    Replies: 1
    Last Post: 16 July, 2009, 11:43 AM
  5. Problems with APF
    By borce in forum Managing
    Replies: 6
    Last Post: 2 February, 2009, 18:08 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •