Jump to content

jamiet757

Members
  • Posts

    86
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jamiet757's Achievements

Member

Member (2/5)

0

Reputation

  1. wow, thanks! I am amazed at how easy that was, I should have been able to come up with it! How about seperating them into multiple columns, so in case I have a string with 100 words I don't have a huge page of links?
  2. I have been becoming more and more familiar with PHP over the past few months, but this problem stumps me. How can I take a string of words separated by spaces taken from an XML feed (example: word1 word2 word3 word4) and turn it into something like this: <a href="word1">word1</a> <a href="word2">word2</a> ... and so on. This has to be done on the fly, since it is taking the words from the XML feed, they change depending on the page. I want them to be in a vertical column, and be able to link each one to the search page for that word, so each link has to be different. An even more in-depth problem, how can I sort it then so that there are multiple columns if necessary, say one page only has 3 words, but another has 50. How can I split them up into multiple vertical columns, say with 10 words in each? Have I confused anyone yet?
  3. Well, I was able to get it to align correctly using this: http://www.pmob.co.uk/pob/centred-float.htm
  4. I am running up against a bit of a problem on a blog I am helping someone with. The theme is fairly simple, no sidebars, nothing fancy. There is a header image, and underneath that is the Nav. They are square images with rollover properties, and they are in a <ul>. The problem is, no matter what I try, I cannot get them to be centered in the page, they always line up to the left. They need to remain side-by-side, not stacked, so the <li> items are floated left. Even when I try wrapping the <ul> in a <div> and setting the margin-left and right to auto, I see no effects. How can I get this bugger to be centered? Here is the CSS: div.cssmenu { text-align: center; margin-left: auto; margin-right: auto; } ul.cssmenu { list-style: none; padding: 0px; position: inherit; } ul.cssmenu li { float: left; } ul.cssmenu li a { display: block; width: 111px; height: 109px; } and here is the section that creates the Nav: <div class="cssmenu"><ul class="cssmenu"> <li class="sidehome"><a href="http://carolinaines.com/blog" title="Home"></a></li> <li class="sideabout"><a href="http://carolinaines.com/blog/about" title="Blog"></a></li> <li class="sidegallery"><a href="http://flickr.com/carouselambra86" target="_blank" title="Contact"></a></li> <li class="sidearchive"><a href="http://carolinaines.com/blog/links" class="selected" title="Home"></a></li> <li class="sidearchives"><a href="http://carolinaines.com/blog/archives" title="Blog"></a></li> <li class="sidecontact"><a href="http://carolinaines.com/blog/contact" title="Contact"></a></li> </ul> </div> Any help is greatly appreciated!
  5. Well I still cannot get it to work. I can't set a fixed width for the <p> since each image might be a different width. Here is the javascript code: /* * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery */ this.imagePreview = function(){ xOffset = 10; yOffset = 10; $("a.preview").hover(function(e){ this.t = this.title; this.title = ""; var c = (this.t != "") ? "<br/>" + this.t : ""; this.n = this.name; this.name = ""; var d = (this.n != "") ? "<br/>" + this.n : ""; $("body").append("<p id='preview'><img src='"+ this.id +"' alt='"+ this.t +"' />"+ c + d +"</p>"); $("#preview") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("slow"); }, function(){ this.title = this.t; this.name = this.n; $("#preview").remove(); }); $(".preview").mousemove(function(e){ var posY; if (e.pageY - $(window).scrollTop() + $('#preview').height() >= $(window).height() ) { posY = $(window).height() + $(window).scrollTop() - $('#preview').height() - 15 ; } else { posY = e.pageY - 15; } $("#preview") .css("top",(posY - 15) +"px") .css("left",(e.pageX + 15) + "px"); }); }; // starting the script on page load $(document).ready(function(){ imagePreview(); }); Another question, the section that starts with $(".preview").mousemove(function(e) prevents the popup from going below the screen, how can I prevent it from going off the sides of the screen as well?
  6. Great, thanks for heading me in the right direction!
  7. Well the problem is that this is how the tooltip is presented: <a href="{ITEM_URL}" class="preview" title="{ITEM_DESC}" name="Author: {ITEM_AUTHOR}" id="{ITEM_IMG2}"><img src="{ITEM_IMG}" border="0" /></a> The {ITEM_DESC} and {ITEM_AUTHOR} are replaced by a description and author text for the image as it is pulled from the database, and they need to reside in the title and name attribute for the <a> tag in order to appear in the caption for the image preview, so how can I assign a class to that?
  8. I am using a jQuery tooltip package I found here: http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery I am using it like example #2: http://cssglobe.com/lab/tooltip/02/ with the caption. The problem is, if the caption is longer than the image is wide, how do I get it to wrap the text around underneath? Right now it just lengthens the gray box and looks ridiculous. I can't use fixed widths because the images are varying widths and the text is varying lengths for each image, so it has to be something that is automatic when the class is called. If anyone can't be troubled to download the files if you need to see the source code I can post it. Just ask. Maybe this is just a problem with the CSS, I don't know. Any help is appreciated!
  9. It is just to make sure someone has entered at least 7 keywords and a description of at least 7 words, to prevent things like "A photo." that give no meaning to the description.
  10. I am trying to figure out how to tell if what a user enters in a textbox is at least 7 words, separated by commas. It can be 100 words, I don't care, as long as it is at least 7. It will appear like this: word1,word2,word3,word4,word5,word6,word7 or word1, word2, word3, word4, word5, word6, word7 (with spaces) Anyone have a statement that I can use? Coincidentally, I need to check to see if there is at least 7 words in a sentence as well, i.e.: The quick brown fox jumped over the. It could be 100 words again, but it needs to be a minimum of 7. Any help is appreciated!
  11. Ok, so here is what I have now: header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$file"); header('Content-type: image/jpeg'); header("Content-Transfer-Encoding: binary"); readfile($content); It downloads the file with the original filename (what I want) and when I open the image in Photoshop it displays correctly, however if I try to preview it using Windows Photo Viewer, it doesn't show up. This is for a stock image site, so when a customer downloads the image, it needs to work right otherwise I will get a lot of complaints.
  12. Well I tried that and this time it actually downloaded the image (with the correct size) but it still didn't display as an image. Is there a way to keep the original filename instead of calling it image.jpg or whatever? Do I just remove the header('Content-Disposition: attachment; filename="image.jpg"'); line?
  13. Can anyone help me figure out how to make it read an external file from a URL?
  14. This is probably not the most complete example but it works: <?php header('Content-type: image/jpeg'); header('Content-Disposition: attachment; filename="image.jpg"'); readfile('[url=http://middlezonemusings.com/wp-content/uploads/2007/03/eiffel-tower.jpg%27]http://middlezonemusings.com/wp-content/uploads/2007/03/eiffel-tower.jpg'[/url]); ?> I tried that and it does download a file called image.jpg, the problem is it is corrupt, it does not display as an image, and the size does not correspond to the image it is supposed to be downloading.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.