Results 1 to 6 of 6
  1. #1
    New Pligger czajna's Avatar
    Joined
    Aug 2009
    Posts
    18

    Question Is it a link from one country or other?

    Hi,

    I am wondering what should I do to add one more field in submiting sites, where people could choose in which language link is.

    The second thing is showing near the title of link on main page some sign (for example UK flag).

    Belowe some examples

    Examples

  2. #2
    New Pligger czajna's Avatar
    Joined
    Aug 2009
    Posts
    18

    Unhappy

    Anyone vcan help?

  3. #3
    New Pligger tvarley's Avatar
    Joined
    Sep 2009
    Posts
    1
    It looks like there is a link_lang column in the database schema.

    I would start by reading and understanding the W3C recommendation regarding language tags.

    W3C i18n article: Language tags in HTML and XML

    I would prefer to populate the link language drop down with the inferred value from the HTML tag. Not sure if I would allow the submitter to override it if it is specified on the page though.

    If the author of the page specifies a language tag :

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">

    Then that is what should be used for the link language value.

  4. #4
    New Pligger czajna's Avatar
    Joined
    Aug 2009
    Posts
    18
    Ok, I have an idea how to do this.

    I enable extra fields and my extra field in new submissions will be a checkbox. When someone will mark checkbox that will be information that submission is in other language than Polish. If it will be marked, there will be some information in link summary (for example English flague).

    The question is...how should I make a checkbox in submission and what should I change in code and where to display this special sign (here is flague) only when checkbox is marked?

    Thanks for help in advance

    Tomasz

  5. #5
    New Pligger czajna's Avatar
    Joined
    Aug 2009
    Posts
    18
    I have some soultions

    make a checkbox in submission
    Go to submit_extra_fields.tpl there it is possible to choose how to should look like field

    HTML Code:
    <input type="checkbox" name="link_field1" id="link_field1" value="{$submit_link_field1}" class="checkbox_pos" />
    display this special sign (here is flague) only when checkbox is marked?
    This problem I didn't solved at all. The file responsilbe for displaying articels is link_summary.tpl, but I don't know how should look's like code which will be generating image only when checkbox is marked. What should I change in code below? (I think that here somethnig...{if $link_field1 neq ""})

    PHP Code:
    {if $Enable_Extra_Field_1 eq 1}{if $link_field1 neq ""} }

    <
    div style="float:right;padding:2px 0 0  5px;" ><img src=" " width="12px" height="8px" " /></a></div>
    {/if}{/if} 

  6. #6
    New Pligger czajna's Avatar
    Joined
    Aug 2009
    Posts
    18

    [Solved] Is it a link from one country or other?

    SOLVED

    submit_extra_fields.tpl

    Code:
    {if $Enable_Extra_Field_1 eq 1}
    				<label for="link_field1"><strong>{$Field_1_Title}:</strong></label><br />
    				<span class="submit_instructions">{$Field_1_Instructions}</span><br />
    				<input type="checkbox" name="link_field1" id="link_field1" value="NAME" class="" />
    link_summary.tpl

    Code:
    {if $Enable_Extra_Field_1 eq 1}{if $link_field1 eq "NAME"}

Similar Threads

  1. Change the database connection according to the country
    By jintoppy in forum Questions & Comments
    Replies: 4
    Last Post: 06-03-2010, 02:04 AM
  2. How to show Country name in Users' list
    By rubber2002 in forum Questions & Comments
    Replies: 6
    Last Post: 05-19-2008, 04:30 PM
  3. how to select country
    By pachouille in forum Questions & Comments
    Replies: 2
    Last Post: 01-18-2008, 08:45 AM
  4. Grab country code from voter's IP
    By kennanj in forum Questions & Comments
    Replies: 7
    Last Post: 06-01-2007, 07:01 PM
  5. Country or language field in LINKS
    By dominik in forum Questions & Comments
    Replies: 0
    Last Post: 04-27-2007, 02:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting