We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Personal Smiley
Topic Started: Jul 25 2015, 05:16 PM (242 Views)
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
ZB
URL in mini profile
I'm looking for a code that would allow member to use custom smiley. I plan on selling the smiley on the store and then they can use the smiley they purchased.
Edited by Tyler Dream, Jul 25 2015, 05:17 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
http://support.zathyus.com/topic/5153592/1/

Like that I assume, only it has to be enabled by the administrator on a user-basis?
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
Yes. I plan on selling emote sets on the store.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
$(function() {
$('#edit_profile td.c_desc:contains(Smiley)').parent('tr').hide();

var uIDS = ['USER_ID', 'USER_ID', 'USER_ID'];

for (var i = 0; i < uIDS.length; i++) {
if ($.zb.stat.mid === uIDS[i]) {
$('#edit_profile td.c_desc:contains(Smiley)').parent('tr').show();
}
}
});
</script>
Try that. Edit the capitalized text as necessary for the users you wish to enable the personal smiley feature for.
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
Wait, with this code which emoticons would be enabled since I see no img url
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Oh, so you're not wanting to allow users to insert their own image URL, but choose from a predefined list of image URL's?
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
Something like that. When they purchase an emoticon from the store they would only get access to the emoticon they purchased
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
About how many different emoticons are you going to be offering to purchase? Trying to figure out the best way to code this.
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
Around 20.
Edited by Tyler Dream, Jul 30 2015, 06:43 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
function enableSmiley(uName, sTag, sURL) {
$('td.c_username').each(function() {
var username = $.trim($(this).text());
if (uName === username) {
$(this).parents('tr[id*="post-"]').next('tr').find('td.c_post').html($(this).parents('tr[id*="post-"]').next('tr').find('td.c_post').html().replace(sTag, '<img src="' + sURL + '" alt="" />'));
}
});
}

enableSmiley('USERNAME', 'SMILEY_TAG', 'SMILEY_URL');
enableSmiley('USERNAME', 'SMILEY_TAG', 'SMILEY_URL');
enableSmiley('USERNAME', 'SMILEY_TAG', 'SMILEY_URL');
//]]>
</script>
Edit the capitalized text as necessary.

It's a bit of a sloppy and repetitive way to do it, but it works.
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
Thanks Cory! :D
Offline Profile Goto Top
 
Moonface
Member Avatar


Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic