Studio Zero
« Smiley Gallery »

Welcome Guest. Please Login or Register.
Dec 9, 2009, 11:27am





Studio Zero :: Web Development :: Code Storage :: Smiley Gallery
Page 1 of 2 » Jump to page   Go    [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: Smiley Gallery (Read 1,535 times)
Wrighty

[image]
Thinks he deserves a custom title, lol.
member is offline

[avatar]

*Has a custom title*


[homepage]

Joined: Oct 2007
Gender: Male
Posts: 1,400
Location: UK
Karma: 34
 Smiley Gallery
« Thread Started on Jul 8, 2008, 7:51pm »

This code will replace the smilies list with the text: 'Smiley Gallery', which when clicked will show a pop-up similar to SZ quick reply one. That shows the smilies.

Note: to use extra smilies with this code, make sure you use the part at the top of the code, which is in red. This CAN be omitted if you don't want to use extra smilies.

<script>
/*Smiley Gallery Extra Smilies*/
var w_e_smile = [
["http://s2.images.proboards.com/laugh.gif", ":lol:"],
["http://s2.images.proboards.com/laugh.gif", ":lol:"],
["http://s2.images.proboards.com/laugh.gif", ":lol:"]//<<< NO COMMA ON THIS LINE!
];
</script>


<script>
/*Smiley Gallery
Created By Wrighty
Do not: rip, repost or claim*/

var s = {
d: document.getElementsByTagName('td'),
win: function(){
var g = window.open("","Smilies", "width=325,height=10,scrollbars=yes").document.body.appendChild( this.x.cloneNode(true) );
},
link: '<a href = "javascript: s.win();">Smiley Gallery</a>',
x: document.createDocumentFragment(),
s: '',
init: function(){
if(document.postForm){
this.build();
}
},
build: function(){
for(a = 0; a < this.d.length; a++){
if(/Smilies:/.test(this.d[a].innerHTML) && /windowbg2/.test(this.d[a].className)){
this.d[a+1].innerHTML = this.d[a+1].innerHTML.replace(/add/g, 'window.opener.add');
this.s = this.d[a+1].firstChild.cloneNode(true);
this.d[a+1].firstChild.innerHTML = this.link;
break;
}
}
this.x.appendChild(document.createElement('br'));
var d = document.createElement('center');
d.appendChild(this.s);
if(typeof w_e_smile != 'undefined'){
for(a = 0; a < w_e_smile.length; a++){
var x = document.createElement('a');
var y = document.createElement('img');
y.src = w_e_smile[a][0];
y.border = '0';
x.appendChild(y);
x.href = 'javascript:window.opener.add(" ' + w_e_smile[a][1] + '")';
d.appendChild(x);
d.appendChild(document.createTextNode(' '));
}
}
d.appendChild(document.createElement('br'));
var ar = document.createElement('a');
ar.href = 'javascript: window.close();';
ar.appendChild(document.createTextNode('Close Window'));
d.appendChild(ar);
this.x.appendChild(d);
}
};
s.init();
</script>


Global Footer
« Last Edit: Nov 9, 2009, 7:24pm by Chris [Away] »Link to Post - Back to Top  IP: Logged

[image]
superkid
Senior Member
****
[p:18]
member is offline



=]


[homepage]

Joined: Jun 2008
Gender: Male
Posts: 265
Karma: 0
 Re: Smiley Gallery
« Reply #1 on Jul 18, 2008, 3:52pm »

I don't think this is compactable with the extra smileys code...
Link to Post - Back to Top  IP: Logged

[image]
Wrighty

[image]
Thinks he deserves a custom title, lol.
member is offline

[avatar]

*Has a custom title*


[homepage]

Joined: Oct 2007
Gender: Male
Posts: 1,400
Location: UK
Karma: 34
 Re: Smiley Gallery
« Reply #2 on Jul 18, 2008, 5:15pm »

Could you link me to the extra smilies code that you are using please? :)
Link to Post - Back to Top  IP: Logged

[image]
superkid
Senior Member
****
[p:18]
member is offline



=]


[homepage]

Joined: Jun 2008
Gender: Male
Posts: 265
Karma: 0
 Re: Smiley Gallery
« Reply #3 on Jul 18, 2008, 6:35pm »

http://support.proboards.com/index.cgi?b....=1&thread=70214
Link to Post - Back to Top  IP: Logged

[image]
Wrighty

[image]
Thinks he deserves a custom title, lol.
member is offline

[avatar]

*Has a custom title*


[homepage]

Joined: Oct 2007
Gender: Male
Posts: 1,400
Location: UK
Karma: 34
 Re: Smiley Gallery
« Reply #4 on Jul 18, 2008, 7:16pm »

Extra smilies is now supported, re-read the first post! :)
Link to Post - Back to Top  IP: Logged

[image]
superkid
Senior Member
****
[p:18]
member is offline



=]


[homepage]

Joined: Jun 2008
Gender: Male
Posts: 265
Karma: 0
 Re: Smiley Gallery
« Reply #5 on Aug 8, 2008, 9:36pm »

Oh, and is there a need for the censored word list?
Link to Post - Back to Top  IP: Logged

[image]
Wrighty

[image]
Thinks he deserves a custom title, lol.
member is offline

[avatar]

*Has a custom title*


[homepage]

Joined: Oct 2007
Gender: Male
Posts: 1,400
Location: UK
Karma: 34
 Re: Smiley Gallery
« Reply #6 on Aug 8, 2008, 11:19pm »

Yes, use the censored words.
Link to Post - Back to Top  IP: Logged

[image]
Koivu
New Member
*
member is offline





Joined: Dec 2008
Gender: Male
Posts: 3
Karma: 0
 Re: Smiley Gallery
« Reply #7 on Dec 9, 2008, 11:35pm »

I like the Sound of this code but i can't get it to work on my forum .. Any chance of getting some help ??
Link to Post - Back to Top  IP: Logged
James

[image]
member is offline



I used to be rich >.<'


[homepage]

Joined: Jun 2008
Gender: Male
Posts: 757
Location: UK
Karma: 23
 Re: Smiley Gallery
« Reply #8 on Dec 10, 2008, 6:46pm »

Perhaps post a link to your forum, so people can see if it's conflicting codes?

Thanks :D
Link to Post - Back to Top  IP: Logged

We need your help. Reward available.
Koivu
New Member
*
member is offline





Joined: Dec 2008
Gender: Male
Posts: 3
Karma: 0
 Re: Smiley Gallery
« Reply #9 on Dec 10, 2008, 7:25pm »

Here Ya Go ..

http://habsfanforum.proboards92.com
« Last Edit: Dec 11, 2008, 12:36am by Koivu »Link to Post - Back to Top  IP: Logged
Koivu
New Member
*
member is offline





Joined: Dec 2008
Gender: Male
Posts: 3
Karma: 0
 Re: Smiley Gallery
« Reply #10 on Dec 11, 2008, 7:23pm »

* Bump *
Link to Post - Back to Top  IP: Logged
Chris [Away]
Head Coder
******
Click Click Boom
member is offline





Joined: Nov 2006
Gender: Male
Posts: 15,550
Location: Nebraska
Karma: 289
 Re: Smiley Gallery
« Reply #11 on Dec 19, 2008, 7:18pm »

The only code conflict I can possible see is this one:

/* "What Are You Listening To" In Posts v1.1


How is the code not working, specifically?
Link to Post - Back to Top  IP: Logged

[image]
[image]
eveready
Dedicated Member
***
[p:10]
member is offline





Joined: Aug 2007
Posts: 136
Karma: 0
 Re: Smiley Gallery
« Reply #12 on Nov 7, 2009, 7:06am »

I copied this code as is in a board with no other codes. The extra smileys are not showing up.

http://eveready11.proboards.com

Also, if you close the popup, and then try to reopen it, the popup box is empty. And if the box is already open, but out of view and behind the window, and you click on 'smiley gallery', the same smileys will be duplicated in the popup. I wonder if these issues could be fixed as well.

Thanks.
« Last Edit: Nov 7, 2009, 8:36am by eveready »Link to Post - Back to Top  IP: Logged
Chris [Away]
Head Coder
******
Click Click Boom
member is offline





Joined: Nov 2006
Gender: Male
Posts: 15,550
Location: Nebraska
Karma: 289
 Re: Smiley Gallery
« Reply #13 on Nov 9, 2009, 7:25pm »


Nov 7, 2009, 7:06am, eveready wrote:
I copied this code as is in a board with no other codes. The extra smileys are not showing up.

http://eveready11.proboards.com

Also, if you close the popup, and then try to reopen it, the popup box is empty. And if the box is already open, but out of view and behind the window, and you click on 'smiley gallery', the same smileys will be duplicated in the popup. I wonder if these issues could be fixed as well.

Thanks.


I've fixed the bug regarding the smilies not reappearing if you close and reopen. I can not reproduce either of the other bugs however. What browser are you using?
Link to Post - Back to Top  IP: Logged

[image]
[image]
eveready
Dedicated Member
***
[p:10]
member is offline





Joined: Aug 2007
Posts: 136
Karma: 0
 Re: Smiley Gallery
« Reply #14 on Nov 10, 2009, 2:08am »

Thanks.

Yeah, it's a browser issue. Not sure why I didn't think of that, but I've been using Google Chrome and haven't had any similar issues.
Link to Post - Back to Top  IP: Logged
Page 1 of 2 » Jump to page   Go    [Search This Thread][Send Topic To Friend] [Print]


Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!