Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2001, 01:46 PM
Streicher Streicher is offline
 
Join Date: Oct 2001
Location: Reinbek, Germany
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a VBB Code Button Hack for Version 2, like the UBB Code Buttons?
Reply With Quote
  #2  
Old 02-19-2001, 01:17 AM
Guest
 
Posts: n/a
Default

Although I like the idea, I'm against javascript in general becuz its buggy.

Those that have used this, are u happy w/ it?
Any complaints?
Reply With Quote
  #3  
Old 02-19-2001, 03:34 AM
Guest
 
Posts: n/a
Default

You mean something like this?

http://sitepointforums.com/forum-dev...newthread.html

going to release it tomorrow with support for pulling your Smilies out of the database and being able to choose them from a popup window.
Reply With Quote
  #4  
Old 02-19-2001, 04:19 AM
Guest
 
Posts: n/a
Default

wayne, looks nice
Reply With Quote
  #5  
Old 02-19-2001, 02:29 PM
Guest
 
Posts: n/a
Default

I look forward to this hack. A lot of people out there just can't figure out vbcode, as simple as it is.
Reply With Quote
  #6  
Old 02-19-2001, 07:46 PM
Guest
 
Posts: n/a
Default

Here is a link to a ubb 6 with UBB CodeButtons:

http://www.esteroumc.com/index.html

user
pass

And a Screenshot:
Attached Images
File Type: jpg codebuttons.jpg (24.4 KB, 0 views)
Reply With Quote
  #7  
Old 03-05-2001, 02:17 PM
Guest
 
Posts: n/a
Default

Never saw a release on this, is it still gonna happen?
Reply With Quote
  #8  
Old 03-05-2001, 05:41 PM
Guest
 
Posts: n/a
Default

buddy open your eyes!

http://www.vbulletin.com/forum/showt...threadid=10305
Reply With Quote
  #9  
Old 03-05-2001, 06:20 PM
Guest
 
Posts: n/a
Default

This is more a template change than a hack.. Total PHP code changes is minimal.

To install:
1. Add the following code to the bottom of MISC.PHP
PHP Code:
// ############################### start iconpopup ###############################
if ($action=="iconpopup") {
  
$templatesused ""// Only one template used so load it when called
  
include("./global.php");
  
$bittoggle=0;
  
$icons=$DB_site->query("SELECT smilietext,title,smiliepath FROM smilie ORDER BY title");
  while (
$icon=$DB_site->fetch_array($icons)) {
    if (
$bittoggle==0) {
      eval(
"\$iconbits1 .= \"".gettemplate("iconpopupbit")."\";");
    } else {
      eval(
"\$iconbits2 .= \"".gettemplate("iconpopupbit")."\";");
    }
    
$bittoggle=$bittoggle?0:1;
  }

  eval(
"dooutput(\"".gettemplate("iconpopup")."\");");

2. Create the following new Templates.

iconpopup Template-
Code:
<html>
<head>
$headinclude
<script language="Javascript">
function insertsmilie(smilieface){

  window.opener.document.vbinput.message.value+=smilieface;
}
</script>

</head>

<body bgColor="white" text="midnightblue" link="darkblue" aLink=red vLink="red" onLoad="window.focus()">
<div align=center><center>
<table border="0" width="{tablewidth}" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td bgcolor="{tablebordercolor}">
      <table border="0" width="100%" cellspacing="1" cellpadding="4">
        <tr><td bgcolor="{tableheadbgcolor}" class="thtcolor"><a name="smilies"></a><b>Message Icons</b></td></tr>
        <tr>
          <td bgcolor="#F5F5F5"><p><font face="Verdana, Arial, Helvetica" size="2" color="midnightblue">Click on the message icons below to insert them in your message:<br>
            <table border="0" align="center" cellpadding="5"><tr valign="top">
              <td width="50%"><table width="100%">$iconbits1</table></td><td width="50%"><table width="100%">$iconbits2</table></td>
            </tr></table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p><a href="JavaScript:onClick= window.close()">Close Window</a></p>
</center></div>
</body>
</html>
iconpopupbit Template -
Code:
<tr bgcolor="{firstaltcolor}">
  <td align=center><a href="Javascript:insertsmilie('$icon[smilietext]');"><img src="$icon[smiliepath]" border=0></a></td>
  <td align=center><normalfont>$icon[smilietext]</normalfont></td>
</tr>
3. Edit Input Templates (newthread, newreply, etc...) to include:
Code:
<tr bgcolor="{secondaltcolor}">
<td><normalfont><b>Format:</b></normalfont></td>
<td bgColor="" align=left>
<a href="Javascript:bold();"><img src="images/icon_editor_bold.gif" width="22" height="22" alt="Bold" border="0"></a><a href="Javascript:italicize();"><img src="images/icon_editor_italicize.gif" width="23" height="22" alt="Italicized" border="0"></a><a href="Javascript:underline();"><img src="images/icon_editor_underline.gif" width="23" height="22" alt="Underline" border="0"></a>
<a href="Javascript:center();"><img src="images/icon_editor_center.gif" width="22" height="22" alt="Centered" border="0"></a>
<a href="Javascript:hyperlink();"><img src="images/icon_editor_url.gif" width="22" height="22" alt="Insert Hyperlink" border="0"></a><a href="Javascript:email();"><img src="images/icon_editor_email.gif" width="23" height="22" alt="Insert Email" border="0"></a><a href="Javascript:image();"><img src="images/icon_editor_image.gif" width="23" height="22" alt="Insert Image" border="0"></a>
<a href="Javascript:showcode();"><img src="images/icon_editor_code.gif" width="22" height="22" alt="Insert Code" border="0"></a><a href="Javascript:quote();"><img src="images/icon_editor_quote.gif" width="23" height="22" alt="Insert Quote" border="0"></a><a href="Javascript:list();"><img src="images/icon_editor_list.gif" width="23" height="22" alt="Insert List" border="0"></a>
<a href="JavaScript:WinOpen('misc.php?action=iconpopup',320,240)"><img src="images/icon_editor_smilie.gif" width="22" height="22" alt="Insert Message Icons" border="0"></a><br>
<font face="" size="">
    <select name="font" onChange="showfont(this.options[this.selectedIndex].value)">
  <option value="Andale Mono">Andale Mono</option>
  <option value="Arial">Arial</option>
  <option value="Arial Black">Arial Black</option>
  <option value="Book Antiqua">Book Antiqua</option>
  <option value="Century Gothic">Century Gothic</option>
  <option value="Comic Sans MS">Comic Sans MS</option>
  <option value="Courier New">Courier New</option>
  <option value="Georgia">Georgia</option>
  <option value="Impact">Impact</option>
  <option value="Tahoma">Tahoma</option>
  <option value="Times New Roman" selected>Times New Roman</option>
  <option value="Trebuchet MS">Trebuchet MS</option>
  <option value="Script MT Bold">Script MT Bold</option>
  <option value="Stencil">Stencil</option>
  <option value="Verdana">Verdana</option>
  <option value="Lucida Console">Lucida Console</option>
</select>&nbsp;
<select name="size" onChange="showsize(this.options[this.selectedIndex].value)">
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3" selected>3</option>
  <option value="4">4</option>
  <option value="5">5</option>
  <option value="6">6</option>
</select>&nbsp;
<select name="color" onChange="showcolor(this.options[this.selectedIndex].value)">
  <option value="black" selected>Black</option>
  <option value="red">Red</option>
  <option value="yellow">Yellow</option>
  <option value="pink">Pink</option>
  <option value="green">Green</option>
  <option value="orange">Orange</option>
  <option value="purple">Purple</option>
  <option value="blue">Blue</option>
  <option value="beige">Beige</option>
  <option value="brown">Brown</option>
  <option value="teal">Teal</option>
  <option value="navy">Navy</option>
  <option value="maroon">Maroon</option>
  <option value="limeGreen">LimeGreen</option>
</select></td>
</tr>
4. All templates edited must have name="vbinput" added to the opening FORM tag.

5. Add the following code to your HEADINCLUDE template.
Code:
<script language="JavaScript1.2" src="editor.js"><!-- Editor Functionality included here --></script>
<script language="Javascript">
function WinOpen(url,x,y) {
	var options = "toolbar=no,scrollbars=yes,resizable=yes,width=" + x + ",height=" + y;
	msgWindow=window.open(url,"_new",options);
}
</script>
6. Upload the attached javascript file and rename it editor.js.
Attached Files
File Type: txt editor.txt (6.6 KB, 47 views)
Reply With Quote
  #10  
Old 03-05-2001, 06:26 PM
Guest
 
Posts: n/a
Default

This is more a template change than a hack.. Total PHP code changes is minimal.

To install:
1. Add the following code to the bottom of MISC.PHP
PHP Code:
// ############################### start iconpopup ###############################
if ($action=="iconpopup") {
  
$templatesused ""// Only one template used so load it when called
  
include("./global.php");
  
$bittoggle=0;
  
$icons=$DB_site->query("SELECT smilietext,title,smiliepath FROM smilie ORDER BY title");
  while (
$icon=$DB_site->fetch_array($icons)) {
    if (
$bittoggle==0) {
      eval(
"\$iconbits1 .= \"".gettemplate("iconpopupbit")."\";");
    } else {
      eval(
"\$iconbits2 .= \"".gettemplate("iconpopupbit")."\";");
    }
    
$bittoggle=$bittoggle?0:1;
  }

  eval(
"dooutput(\"".gettemplate("iconpopup")."\");");

2. Create the following new Templates.

iconpopup Template-
Code:
<html>
<head>
$headinclude
<script language="Javascript">
function insertsmilie(smilieface){

  window.opener.document.vbinput.message.value+=smilieface;
}
</script>

</head>

<body bgColor="white" text="midnightblue" link="darkblue" aLink=red vLink="red" onLoad="window.focus()">
<div align=center><center>
<table border="0" width="{tablewidth}" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td bgcolor="{tablebordercolor}">
      <table border="0" width="100%" cellspacing="1" cellpadding="4">
        <tr><td bgcolor="{tableheadbgcolor}" class="thtcolor"><a name="smilies"></a><b>Message Icons</b></td></tr>
        <tr>
          <td bgcolor="#F5F5F5"><p><font face="Verdana, Arial, Helvetica" size="2" color="midnightblue">Click on the message icons below to insert them in your message:<br>
            <table border="0" align="center" cellpadding="5"><tr valign="top">
              <td width="50%"><table width="100%">$iconbits1</table></td><td width="50%"><table width="100%">$iconbits2</table></td>
            </tr></table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p><a href="JavaScript:onClick= window.close()">Close Window</a></p>
</center></div>
</body>
</html>
iconpopupbit Template -
Code:
<tr bgcolor="{firstaltcolor}">
  <td align=center><a href="Javascript:insertsmilie('$icon[smilietext]');"><img src="$icon[smiliepath]" border=0></a></td>
  <td align=center><normalfont>$icon[smilietext]</normalfont></td>
</tr>
3. Edit Input Templates (newthread, newreply, etc...) to include:
Code:
<tr bgcolor="{secondaltcolor}">
<td><normalfont><b>Format:</b></normalfont></td>
<td bgColor="" align=left>
<a href="Javascript:bold();"><img src="images/icon_editor_bold.gif" width="22" height="22" alt="Bold" border="0"></a><a href="Javascript:italicize();"><img src="images/icon_editor_italicize.gif" width="23" height="22" alt="Italicized" border="0"></a><a href="Javascript:underline();"><img src="images/icon_editor_underline.gif" width="23" height="22" alt="Underline" border="0"></a>
<a href="Javascript:center();"><img src="images/icon_editor_center.gif" width="22" height="22" alt="Centered" border="0"></a>
<a href="Javascript:hyperlink();"><img src="images/icon_editor_url.gif" width="22" height="22" alt="Insert Hyperlink" border="0"></a><a href="Javascript:email();"><img src="images/icon_editor_email.gif" width="23" height="22" alt="Insert Email" border="0"></a><a href="Javascript:image();"><img src="images/icon_editor_image.gif" width="23" height="22" alt="Insert Image" border="0"></a>
<a href="Javascript:showcode();"><img src="images/icon_editor_code.gif" width="22" height="22" alt="Insert Code" border="0"></a><a href="Javascript:quote();"><img src="images/icon_editor_quote.gif" width="23" height="22" alt="Insert Quote" border="0"></a><a href="Javascript:list();"><img src="images/icon_editor_list.gif" width="23" height="22" alt="Insert List" border="0"></a>
<a href="JavaScript:WinOpen('misc.php?action=iconpopup',320,240)"><img src="images/icon_editor_smilie.gif" width="22" height="22" alt="Insert Message Icons" border="0"></a><br>
<font face="" size="">
    <select name="font" onChange="showfont(this.options[this.selectedIndex].value)">
  <option value="Andale Mono">Andale Mono</option>
  <option value="Arial">Arial</option>
  <option value="Arial Black">Arial Black</option>
  <option value="Book Antiqua">Book Antiqua</option>
  <option value="Century Gothic">Century Gothic</option>
  <option value="Comic Sans MS">Comic Sans MS</option>
  <option value="Courier New">Courier New</option>
  <option value="Georgia">Georgia</option>
  <option value="Impact">Impact</option>
  <option value="Tahoma">Tahoma</option>
  <option value="Times New Roman" selected>Times New Roman</option>
  <option value="Trebuchet MS">Trebuchet MS</option>
  <option value="Script MT Bold">Script MT Bold</option>
  <option value="Stencil">Stencil</option>
  <option value="Verdana">Verdana</option>
  <option value="Lucida Console">Lucida Console</option>
</select>&nbsp;
<select name="size" onChange="showsize(this.options[this.selectedIndex].value)">
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3" selected>3</option>
  <option value="4">4</option>
  <option value="5">5</option>
  <option value="6">6</option>
</select>&nbsp;
<select name="color" onChange="showcolor(this.options[this.selectedIndex].value)">
  <option value="black" selected>Black</option>
  <option value="red">Red</option>
  <option value="yellow">Yellow</option>
  <option value="pink">Pink</option>
  <option value="green">Green</option>
  <option value="orange">Orange</option>
  <option value="purple">Purple</option>
  <option value="blue">Blue</option>
  <option value="beige">Beige</option>
  <option value="brown">Brown</option>
  <option value="teal">Teal</option>
  <option value="navy">Navy</option>
  <option value="maroon">Maroon</option>
  <option value="limeGreen">LimeGreen</option>
</select></td>
</tr>
4. All templates edited must have name="vbinput" added to the opening FORM tag.

5. Add the following code to your HEADINCLUDE template.
Code:
<script language="JavaScript1.2" src="editor.js"><!-- Editor Functionality included here --></script>
<script language="Javascript">
function WinOpen(url,x,y) {
	var options = "toolbar=no,scrollbars=yes,resizable=yes,width=" + x + ",height=" + y;
	msgWindow=window.open(url,"_new",options);
}
</script>

6. Upload the file: http://sitepointforums.com/editor.js to your server.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:43 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07571 seconds
  • Memory Usage 2,302KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (1)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete