Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-18-2013, 07:18 PM   PM User | #1
charlyanderson
Regular Coder

 
Join Date: Dec 2012
Posts: 111
Thanks: 14
Thanked 1 Time in 1 Post
charlyanderson is an unknown quantity at this point
Can someone advise me how to add alt desc in php?

Hi,

I need to make an amendment to a plugin as it's throwing up validation errors as the alt tag isnt there. I am defining the alt tags so I presume the plugin isn't picking them up. There's no support from creator so any help would be appreciated:-

The code that I think is relevant is:-

Code:
			$ivrss_html = $ivrss_html . "<div class='cas_div' style='height:$dis_height;padding:2px 0px 2px 0px;'>"; 
			$ivrss_html = $ivrss_html . "<a style='text-decoration:none' target='$ivrss_target' class='cas_div' href='$ivrss_link'><img src='$ivrss_path'></a>";
			$ivrss_html = $ivrss_html . "</div>";
			
			$ivrss_js = $ivrss_js . "ivrss_array[$ivrss_count] = '<div class=\'cas_div\' style=\'height:$dis_height;padding:2px 0px 2px 0px;\'><a style=\'text-decoration:none\'  target=\'$ivrss_target\' href=\'$ivrss_link\'><img src=\'$ivrss_path\'></a></div>'; ";
charlyanderson is offline   Reply With Quote
Old 02-18-2013, 08:10 PM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,468
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
<img src=\'$ivrss_path\'> doesn't have an alt attribute
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 02-18-2013, 08:47 PM   PM User | #3
charlyanderson
Regular Coder

 
Join Date: Dec 2012
Posts: 111
Thanks: 14
Thanked 1 Time in 1 Post
charlyanderson is an unknown quantity at this point
Hi Felgall,

Thanks for your reply... would you know how to add this in?
charlyanderson is offline   Reply With Quote
Old 02-18-2013, 09:14 PM   PM User | #4
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,468
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
<img src=\'$ivrss_path\' alt=\"whatever the alt text needs to be\">
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 02-18-2013, 11:36 PM   PM User | #5
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,615
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
And to add to this: The value of the alt attribute can be empty. So only put alternative text there if it is actually feasible (the attribute itself, however, must be present at all times).
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 02-19-2013, 10:59 AM   PM User | #6
charlyanderson
Regular Coder

 
Join Date: Dec 2012
Posts: 111
Thanks: 14
Thanked 1 Time in 1 Post
charlyanderson is an unknown quantity at this point
Thank you both, this has solved my problem :-)
charlyanderson is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:46 AM.


Advertisement
Log in to turn off these ads.