Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Noob question - Help would be greatly appreciated

    Hey guys,

    I'm trying to edit a flash template to upload on my website, and although Iv never worked with XML before, and Iv only got a very limited knowledge of html, so far so good!

    However, I'm stuck with one thing. If anyone could kindly help me out I would greatly appreciate it. Its probably a very basic error that Im making, but its driving me crazy!!

    Ok - I want to insert a hyperlink into a flash box that pops up. Here is the code from the template that I am trying to edit:

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <data>
    <setting>
    <thumbnail height="320"></thumbnail>
    </setting>
    <image thumbnailwidth="255"  thumburl="images/gallery/thumbs/1.jpg" imageurl="images/gallery/normal/1.jpg">
    <title><![CDATA[<font color="#ffff00" size="16"><b>Click Me</b></font>]]></title>
    <summary><![CDATA[<font color="#ffffff" size="12"></font>]]>
    </summary>
    <text><![CDATA[In blandit orci sed tellus iaculis dapibus. Phasellus ut ipsum sed erat pharetra aliquam. Mauris vel fermentum purus. Donec euismod neque eros, nec sodales massa. Sed pretium interdum faucibus. Phasellus nec leo at libero imperdiet bibendum a eget dui. Nullam posuere, turpis nec placerat dictum, metus erat semper turpis, vel vestibulum lectus urna sit amet dui. Cras imperdiet commodo magna, in ultricies ante molestie sit amet. Phasellus at dui sem. Donec augue risus, eleifend ut posuere id, eleifend vel felis. Suspendisse nec libero a massa facilisis vestibulum. Sed dui lectus, suscipit quis vehicula a, lacinia ac eros. Ut eget leo justo. Curabitur ut nunc in ipsum faucibus placerat. Donec leo ipsum, molestie quis volutpat vel, feugiat et libero. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur libero sapien, semper id elementum non, porttitor quis lorem. Aenean venenatis pharetra quam. Nulla facilisi. Integer nec leo vel orci euismod euismod id at ante.]]></text>
    </image>
    So the hyperlink I want to enter needs to come after
    Code:
    <text><![CDATA[In blandit orci sed tellus iaculis dapibus.
    but I really dont know what code I should be using to get it to actually work.

    Can anyone help me? What exactly do I need to replace that with? For example, if I want to put a hyperlink to google is it
    Code:
    <text><![CDATA[<a href="<A href="http://www.google.com">click here</a>]
    ??

    If anyone could kindly help me I would be very very thankful.

    Thanks,

    Emma

  • #2
    New to the CF scene
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Anyone able to help with this? Would be appreciated. Thanks, Em

  • #3
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,459
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Well, you've got an <a href> tag inside another... that can't be good. :-)

    It's more important to show us the code processing this XML, because that'll give us some idea how you're transforming from XML to HTML.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #4
    New to the CF scene
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Alex,

    Thank you very much for your response. I just noticed the two <a href> tags - lol. Told you I was a noob! But to be fair that was only me attempting to further clarify the question I was trying to ask regarding the hyperlink. Iv tried it a number of different ways (including only one <a href> tag!) and I still cant get it to work.

    Iv even copied code from other pages which have hyperlinks, and for some reason on the page I want the hyperlink to function it just wont work!

    Here is the code used on a file named "config.xml". As you can see, this code includes hyperlinks in the footer to social networks, and also to "mywebsite.com":

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <!-- XML TEMPLATE CONFIG SETTING -->
    <data>
    	<!-- LOGO -->
    	<logo>
    		<setting>
    			<!-- logo setting -->
    			<logo x="20" y="20" height="35">images/logo.png</logo>
    		</setting>
    	</logo>
    	<!-- FOOTER -->
    	<footer>
    		<setting>
    			<!-- icon tooltip setting -->
    			<tooltip color="0xffff00" textColor="0x000000"></tooltip>
    			<!-- socailnetworks -->
    			<icon name="Flickr" src="images/socails/flickr_16.png" link="http://flickr.com,_blank" />
    			<icon name="Twitter" src="images/socails/twitter_16.png" link="http://twitter.com,_blank" />
    			<icon name="Facebook" src="images/socails/facebook_16.png" link="http://facebook.com,_blank" />
    		</setting>
    		<text><![CDATA[<font color="#595959">©2011 <font color="#dbdbdb"><a href="http://mywebsite.com" target="_blank">mywebsite.com</a></font>, all rights reserved.</font>]]></text>
    	</footer>
    Knowing that this code works on the footer, I tried to replicate it onto the section I felt it was necessary, but although the text comes up, it does not function as a hyperlink (i.e. the anchor text is there but its not clickable).

    When you ask for the code processing this xml, what exactly do you mean?
    Do you know what the file might be called?

    In the xml folder of the template I have the following files:

    about
    bottom
    config
    contact
    news
    site
    slideshow

    could it be any of these perhaps?

    I really appreciate your help.

    Thanks,

    Emma

  • #5
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,459
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Well, who or what is reading your XML? PHP, Python, Perl, JavaScript in a web page, some C++ code...? A commercial product like WordPress?

    What web browser are you using to see your web page? This is important because different browsers have different tools for debugging the webpage and any associated content, including your XML.

    I'm gonna lay a guess out there and suggest that your hyperlinks are being processed as raw XML instead of XHTML - which is HTML formatted as XML. You might need an XHTML namespace declaration (and I think I'll let you look that up).

    Finally, I am worried you might be biting off more than you can chew. You mentioned earlier you have no experience with XML and only a little HTML experience. Trying to tackle both at the same time for the first time is not easy.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog


  •  

    Tags for this Thread

    Posting Permissions

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