Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Code Requests
  • Completed Requests
  • [Completed] [ZB] Simple Signature Code
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
[Completed] [ZB] Simple Signature Code
Tweet Topic Started: Oct 11 2009, 11:09 AM (229 Views)
trose7 Oct 11 2009, 11:09 AM Post #1


Posts:
22
Group:
Member
Member
#1,626
Joined:
Nov 26, 2008
Coding language
ASP.Net
I want a code that will display an image in someones signature if they don't have one yet. Somewhat like this one:

<script type="text/javascript">
/*
created by HolySavior of iFusion and
http://javascriptin.com
*/
$(function() {
var siggy ="No sig yet";

$(".c_nosig").html(siggy);
});
</script>

Except that I want it to be able to show images, and this one doesn't. Thank you!
Edited by trose7, Oct 11 2009, 11:10 AM.
Offline Profile Goto Top
 
Swordslam46 Oct 11 2009, 11:23 AM Post #2
Member Avatar


Posts:
934
Group:
Dedicated
Member
#2,773
Joined:
Apr 9, 2009
<script type="text/javascript">
/*
created by HolySavior of iFusion and
http://javascriptin.com
*/
$(function() {
var siggy ="<img src="url" />";

$(".c_nosig").html(siggy);
});
</script>


This is my first attempt at a code:

Where is says "url" change that to the picture you want.
Offline Profile Goto Top
 
trose7 Oct 11 2009, 12:55 PM Post #3


Posts:
22
Group:
Member
Member
#1,626
Joined:
Nov 26, 2008
Coding language
ASP.Net
I think you misunderstand my request. I know how to post an image in the code, but when I do, the code breaks and doesn't allow the image to be displayed. I need a code that will display an image or a link, but this one doesn't.
Offline Profile Goto Top
 
RedBldSandman Oct 11 2009, 01:09 PM Post #4
Member Avatar
ZIPPY!

Posts:
482
Group:
Coding Staff
Member
#2,122
Joined:
Jan 25, 2009
Actually, that code would work fine to add in an image. Just make sure that you don't use double quotes when defining any of the image's attributes (e.g. Source or Alt). It would be:
Code:
 
var siggy = "<img src='SRC' alt='ALT' />"
Edited by RedBldSandman, Oct 11 2009, 01:10 PM.
Posted Image
"To iterate is human, to recurse divine."

Offline Profile Goto Top
 
slayer766 Oct 11 2009, 04:07 PM Post #5
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Code:
 
<script type="text/javascript">
$(".c_nosig").html("<img src='URL_OF_IMAGE'>");
</script>
Offline Profile Goto Top
 
PIWYRCOM Oct 14 2009, 07:43 PM Post #6
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
slayer766, just installed the code and it works great(image), is there a way to insert a url link, like to the board rules too?
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
Gorgor Oct 14 2009, 07:59 PM Post #7
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
Code:
 
<script type="text/javascript">
$(".c_nosig").html("<img src='URL_OF_IMAGE'><a href='URL_OF_LINK'>Click me</a>");
</script>
Offline Profile Goto Top
 
PIWYRCOM Oct 14 2009, 09:32 PM Post #8
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
Thanks Gorgor
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
Reid Oct 15 2009, 11:58 AM Post #9
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Gonna throw this one in as completed.

You're welcome.
See? We can read thoughts too. ;)

Your request has been completed, and we're moving it to the correct forum. We hope it works for you; if it doesn't, feel free to post another request topic in the requests forum. Just remember: read the rules first!

Thanks,
The ZBCode Staff
The Resource Board
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Completed Requests · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 2:27 PM Jul 11
Hosted for free by ZetaBoards · Privacy Policy