vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: QR Smiley & UBBC Drop Down Mod - View Topic
Topic Rating: *****
Printable View
dog199200
Guest
QR Smiley & UBBC Drop Down Mod (10th Jul 08 at 8:05pm UTC)
Can i get a mod to this code please, so that it will also show any smiles that have been added through the Forum Smilies feature...if the name is going to be a problem, then have then just show the code to put in instead of the smiles name.

Code:
 
  1. <script>
  2. /*QR Smiley & UBBC Drop Down.
  3. Coded By Wrighty
  4. No Ripping, Reposting or Claiming*/
  5.  
  6. function _qr(x,y){
  7.     var _a = (x==1)? get('quick_reply_ubbc','id').getElementsByTagName('center')[1] : get('quick_reply_ubbc','id').getElementsByTagName('center')[0];
  8.     var w_ub = [];
  9.     var c_ub = [];
  10.     var i_ub = _a.getElementsByTagName('A');
  11.     var d_ub = document.createElement('SELECT');
  12.     d_ub.options[0] = new Option(y, null, null, null);
  13.     d_ub.onchange = function() {
  14.         eval(this.options[this.options.selectedIndex].value);
  15.     }
  16.     for (i=i_ub.length-1;i>= 0;i--) {
  17.         c_ub.push(i_ub[i].getAttribute('onClick'));
  18.         w_ub.push(i_ub[i].getElementsByTagName('IMG').item(0).alt) ;
  19.         i_ub[i].parentNode.removeChild(i_ub[i]);
  20.     }
  21.     for (i=0;i<w_ub.length;i++) {
  22.         d_ub.options[d_ub.options.length] = new Option(w_ub[i], c_ub[i], null, null);
  23.     }
  24.     get('quick_reply_ubbc','id').replaceChild(d_ub, _a);
  25. }
  26. if(get('quick_reply_ubbc','id').getElementsByTagName('center')){
  27.     _qr(1, 'Smilies');
  28.     _qr(0, 'UBBC Tags');
  29. }
  30. </script>
 
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: QR Smiley & UBBC Drop Down Mod (10th Jul 08 at 8:13pm UTC)
Unfortunately, the ones added through the admin panel don't display in the quick reply, and therefore can't be added to the code! {Sad}

Try using the 'extra smilies in QR' code above this first! {Smile}
dog199200
Guest
Re: QR Smiley & UBBC Drop Down Mod (10th Jul 08 at 8:14pm UTC)
{Smile} ok

edit: and i struck out, it have a plavce marker for them, but the area are blank and when you click one of them nothing happens. Something is going to have to be coded, and i dont mind having to go thgrough and add in every single smiley one by one to get them all into a dropdown menu.
 Printable View

All times are GMT+0 :: The current time is 3:39am
Page generated in 0.4956 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums