Jump to content

ALT tag?


KDM

Recommended Posts

I have a picture sharing site that allows users to post the pictures into forums using  code like this.

 

1772.jpg

 

How can I add an image alt tag to this code? When the images are posted in forums I want my alt tag to be my keyword.

 

Thanks.

Link to comment
Share on other sites

Alter whatever BBCode parser you're using to include an alt attribute for the image.

 

Not sure how? Post code.

 

[url=http://www.*************.net][img=http://www.*************.net/uploads/1772.jpg][/url]

Link to comment
Share on other sites

That's the BBCode users enter. requinix was asking for the PHP code that parses the BBCode.

 

 

oh ok.

 

$d[]="<div style='margin-left:auto; margin-right:auto;'> 
<p style='padding:0; margin:0; margin-right:20px; text-align:center; font-size:14px;'><a href='force.php?path=uploads/".$imgs[0]->link."'> Click to Download Image</a></p><br />
".$thelarge."
<div style='overflow:auto; clear:both'>
<div style='margin-left:auto; margin-right:auto;'> 
Image: <span style='color:#FFFFFF;'>{$imgs[0]->name}</span><br />
<span style='color:#ffffff; font-size:13px;'>Posted on: ".date('m-d-Y',$imgs[0]->date_added)." by ".ucfirst($theuser)."</span>
</div>
</div>


<div style='margin-left:auto; margin-right:auto; margin-top:5px;'> 
<!-- Insert unique view count -->
<span style='color:#ffffff; font-size:13px;'>Views: $_views</span>
</div>



            
<div style='font-size:12px;  margin-top:30px; margin-left:5px;'>
".'Share Link<br /><input name="textfield3" type="text" class="imagedetails_links" id="textfield3" onclick="this.select();this.focus()" value=http://www.******.net/uploads/'.$imgs[0]->link.'><br />
For posting in forums use this:<br />
<input name="textfield6" type="text" class="imagedetails_links" id="textfield6" onclick="this.select();this.focus()" value="[url=http://www.******.net][img=http://www.******.net/uploads/'.$imgs[0]->link.'][/url]" size="70" /> <br />
</div>

';

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.