boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

B2 Smilies Hack v2.1 (for b2 0.6 pre3+)
Goto page Previous  1, 2, 3, 4, 5, 6, 7
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
xytx



Joined: 24 May 2003
Posts: 48

PostPosted: Mon May 26, 2003 4:53 pm    Post subject: Reply with quote

how ccan u put it in your comments field? like have a box like cyberian does next to his textfield box? i've been looking and couldnt find one.
Back to top
View user's profile Send private message
beachgerl



Joined: 14 Apr 2003
Posts: 37
Location: San Diego

PostPosted: Sun Aug 03, 2003 6:07 pm    Post subject: Reply with quote

Is there a new version of Smilies hack for latest B2 6.2.1? The old version of Smilies doesn't work with new version of B2 anymore. It'd be great if there's updated one, if there is, point me the way please. Razz
Back to top
View user's profile Send private message
Semotions



Joined: 24 Oct 2003
Posts: 5

PostPosted: Fri Oct 24, 2003 9:33 pm    Post subject: I downloaded the b2 smili thing Reply with quote

I downloaded the B2 smilie thing but I can't find the code it told me to replace.

This is what it says in the readme:

B2 Smilies Hack v2.1

1. Open b2edit.form.php

=====
Find
=====
<textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual"><?php echo $content ?></textarea><br />
=====

=====
Replace with
=====
<?php if ($use_smilies) { ?>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td valign="middle" width="100%">
<textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual"><?php echo $content ?></textarea>
</td>
<td valign="middle" align="right" style="padding: 10px; margin: 10px;">
<table bgcolor="#F0F0F0" cellspacing="0" cellpadding="0" border="0" align="center" style="border: 1px solid #CCCCCC; padding: 2px; margin: 1px;">
<tr>
<?php
$i=0;
$j=0;
$prev_val="";
asort($b2smiliestrans);
while (list ($key, $val) = each ($b2smiliestrans)) {
if($prev_val and $val==$prev_val) { }
else if(!$prev_val or ($prev_val and $val!=$prev_val)){
if($i==4) {
if($j<4) {
echo "</tr><tr>\n";
$i=0;
$j++;
}
else if($j==4) {
echo "</tr>\n";
break;
}
}
?>
<td><img src="<?php echo "$smilies_directory/$val"; ?>" onclick="emoticon('<?php echo $key; ?>')" onmouseover="style.cursor='hand'" /></td>
<?php
$i++;
}
$prev_val = $val;
}
?>
<tr>
<td align="center" valign="bottom" colspan="4">
[ <a href="#" onclick="window.open('/','b2smilies', 'width=200,height=300,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0')">All</a> ]
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php } else { ?>
<textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual"><?php echo $content ?></textarea><br />
<?php } ?>
=====

2. Upload b2smilies.php in your b2 dir.

I cannot find <textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual"><?php echo $content ?></textarea><br />.
Can somebody help me?!?
_________________
Lisa
www.semotions.com
Back to top
View user's profile Send private message Visit poster's website AIM Address
Semotions



Joined: 24 Oct 2003
Posts: 5

PostPosted: Fri Oct 24, 2003 10:51 pm    Post subject: I can't find the b2edit.form.php Reply with quote

I can't find the b2edit.form.php. Question
Where is it?
When I downloaded b2 it didn't come with it.
Can somebody help me? Very Happy
_________________
Lisa
www.semotions.com
Back to top
View user's profile Send private message Visit poster's website AIM Address
moose



Joined: 04 May 2003
Posts: 196
Location: Winnipeg Canada

PostPosted: Sat Oct 25, 2003 12:01 am    Post subject: Reply with quote

it should be in /b2-include/~
Back to top
View user's profile Send private message Visit poster's website
Semotions



Joined: 24 Oct 2003
Posts: 5

PostPosted: Sat Oct 25, 2003 12:29 am    Post subject: Thank you soo much! Reply with quote

Yea that's how stupid i am when doing things i dont know what i'm doing. lol Thanks!
_________________
Lisa
www.semotions.com
Back to top
View user's profile Send private message Visit poster's website AIM Address
Semotions



Joined: 24 Oct 2003
Posts: 5

PostPosted: Sat Oct 25, 2003 12:44 am    Post subject: Hey! I downloaded the smilies thing Reply with quote

I downloaded the smilies thign and everything is working fine but when it goes to pop up when I click on more smilies, it's a broken link. Can you help me?
_________________
Lisa
www.semotions.com
Back to top
View user's profile Send private message Visit poster's website AIM Address
mtwib



Joined: 09 Aug 2003
Posts: 7

PostPosted: Sat Nov 01, 2003 7:26 pm    Post subject: Reply with quote

I just hacked it in. The pop-up window works perfectly but the side box does not work, when I click on the smilies in the side box they are not inserted into the edit box. help? Smile
Back to top
View user's profile Send private message Visit poster's website
Washi



Joined: 06 Nov 2003
Posts: 1

PostPosted: Thu Nov 06, 2003 7:46 pm    Post subject: Problems... Reply with quote

Hey,

I'm new around, but I've been checking out the hacks for a while now. I've been trying for a while to make this hack work, but it never did. I either get an error message, or the smiley box doesn't show on the b2.edit.php page. Can someone please help me? My blog is here: Dark-Bliss
I'm totally new with coding etc... but I'd like to have my own custom smileys instead of the regular ones.

Help, please?

Thanks. Very Happy
Back to top
View user's profile Send private message
acidgloss



Joined: 08 Oct 2003
Posts: 12
Location: Long Island NY

PostPosted: Fri Dec 05, 2003 3:21 am    Post subject: Not working... Reply with quote

I'm running b2 0.6.2.1 -- I attempted this hack; and it's not even showing up on the page; I tried the OLD version of the hack where it just showed all of the smilies; and I got them to show up on the b2edit page but I didn't get them to show up on the actual entry itself.

I'd like to install either one that will actually work; and trying all of the updated .zip files here on the forums, plus the origional b2 hack; I couldn't find it. Anyone willing to help me out??

I'm posting my b2.edit.form.php page below:

Code:
<?php
echo $tabletop;

switch($action) {
   case "post":
      $submitbutton_text = "Blog this !";
      $toprow_title = "New Post";
      $form_action = "post";
      $form_extra = "";
      if ($use_pingback) {
         $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" checked="checked" tabindex="7" id="pingback" /><label for="pingback"> PingBack the URLs in this post</label><br />';
      } else {
         $form_pingback = '';
      }
      if ($use_trackback) {
         $form_trackback = '<br /><br /><label for="trackback"><b>TrackBack</b> an URL:</label><br /><input type="text" name="trackback_url" style="width: 415px" id="trackback" />';
      } else {
         $form_trackback = '';
      }
      $colspan = 3;
      break;
   case "edit":
      $submitbutton_text ="Edit this !";
      $toprow_title = "Editing Post #".$postdata["ID"];
      $form_action = "editpost";
      $form_extra = "\" />\n<input type=\"hidden\" name=\"post_ID\" value=\"$post";
      $colspan = 2;
      $form_pingback = '<input type="hidden" name="post_pingback" value="0" />';
      $form_trackback = '';
      break;
   case "editcomment":
      $submitbutton_text ="Edit this !";
      $toprow_title = "Editing Comment #".$commentdata["comment_ID"];
      $form_action = "editedcomment";
      $form_extra = "\" />\n<input type=\"hidden\" name=\"comment_ID\" value=\"$comment\" />\n<input type=\"hidden\" name=\"comment_post_ID\" value=\"".$commentdata["comment_post_ID"];
      $colspan = 3;
      $form_pingback = '<input type="hidden" name="post_pingback" value="0" />';
      $form_trackback = '';
      break;
}

?>

<form name="post" action="b2edit.php" method="POST">
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value="<?php echo $form_action.$form_extra ?>" />

<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
   <td<?php

if ($action != "editcomment") {

// this is for everything but comment editing
   ?>>
   <table height="60" align="left" cellpadding="0" cellspacing="0">
      <td height="60" width="190">
      <label for="title"><b>Title :</b></label><br />
      <input type="text" name="post_title" size="20" tabindex="1" style="width: 170px;" value="<?php echo $edited_post_title; ?>" id="title" />
      </td>
      <td>
      <label for="category"><b>Category :</b></label><br /><?php dropdown_categories(); ?>
      </td>
   </table>
   <?php

} else {
   
// this is for comment editing
   ?> colspan="2"> </td>
</tr>

<tr>
   <td>
   <label for="name"><b>Name :</b></label><br />
   <input type="text" name="newcomment_author" size="20" value="<?php echo format_to_edit($commentdata["comment_author"]) ?>" tabindex="1" id="name" /></td>
   <td>
   <label for="email"><b>E-mail :</b></label><br />
   <input type="text" name="newcomment_author_email" size="20" value="<?php echo format_to_edit($commentdata["comment_author_email"]) ?>" tabindex="2" id="email" /></td>
   <td>
   <label for="URL"><b>URL :</b></label><br />
   <input type="text" name="newcomment_author_url" size="20" value="<?php echo format_to_edit($commentdata["comment_author_url"]) ?>" tabindex="3" id="URL" />
   <?php
   
}

   ?>
   </td>
</tr>
<tr>
<td colspan="<?php echo $colspan; ?>">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<td valign="bottom">
<?php
if ($action != 'editcomment') {
   echo '<label for="content"><b>Post :</b></label>';
} else {
   echo '<br /><label for="content"><b>Comment :</b></label>';
}
?>
</td>
<td valign="bottom" align="right">
<?php if ($use_quicktags) include($b2inc.'/b2quicktags.php'); ?>
</td>
</table>

<?php if ($use_smilies) { ?>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td valign="middle" width="100%">
<textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual"><?php echo $content ?></textarea>
</td>
<td valign="middle" align="right" style="padding: 10px; margin: 10px;">
<table bgcolor="#F0F0F0" cellspacing="0" cellpadding="0" border="0" align="center" style="border: 1px solid #CCCCCC; padding: 2px; margin: 1px;">
<tr>
<?php
$i=0;
$j=0;
$prev_val="";
asort($b2smiliestrans);
while (list ($key, $val) = each ($b2smiliestrans)) {
  if($prev_val and $val==$prev_val) { }
  else if(!$prev_val or ($prev_val and $val!=$prev_val)){ 
    if($i==4) {
      if($j<4) {
        echo "</tr><tr>\n";
        $i=0;
        $j++;
      }
      else if($j==4) {
         echo "</tr>\n";
         break;
      }
    }
?>
<td><img src="<?php echo "$smilies_directory/$val"; ?>" alt="<?php echo $key; ?>" border="0" onclick="emoticon('<?php echo $key; ?>')" onmouseover="style.cursor='hand'" /></td>
<?php
    $i++;
  }
  $prev_val = $val;
}
?>
<tr>
<td align="center" valign="bottom" colspan="4">
[ <a href="#" onclick="window.open('b2smilies.php','b2smilies', 'width=200,height=300,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0')">All</a> ]
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php } else { ?>
<textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual"><?php echo $content ?></textarea><br />
<?php } ?>

<input type="checkbox" class="checkbox" name="post_autobr" value="1" <?php
if ($autobr)
echo " checked" ?> tabindex="7" id="autobr" /><label for="autobr"> Auto-BR (converts line-breaks into <br /> tags)</label><br />

<?php echo $form_pingback ?>

<?php if ($use_preview) { ?>
<input type="button" value="preview" onclick="preview(this.form);" class="search" tabindex="8" />
<?php } ?>

<input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" class="search" style="font-weight: bold;" tabindex="5" />

<?php if ($use_spellchecker) { ?>
<!--<input type = "button" value = "Spell Check" onclick="var f=document.forms[0]; doSpell( 'en', f.post_content, '<?php echo $spellchecker_url ?>/sproxy.cgi', true);" class="search" tabindex="5" />-->
<input type="button" value="Spellcheck" onclick="DoSpell
('post','content','');" class="search" tabindex="9"/>
<?php } ?>

<?php if ( ($use_fileupload) && ($user_level >= $fileupload_minlevel) && ((ereg(" ".$user_login." ", $fileupload_allowedusers)) || (trim($fileupload_allowedusers)=="")) ) { ?>
<input type="button" value="upload a file/image" onclick="launchupload();" class="search"  tabindex="10" />
<?php }

echo $form_trackback;

// if the level is 5+, allow user to edit the timestamp - not on 'new post' screen though
#if (($user_level > 4) && ($action != "post"))
if ($user_level > 4) {
   touch_time(($action=="edit"));
}
?>
<script language="JavaScript">
<!--
//   document.blog.post_content.focus();
//-->
</script>
</td>
</tr>
</table>
<?php echo $tablebottom ?>
</form>


And my b2config.php file; is set with the default smilies.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
ktknievel



Joined: 17 Jan 2004
Posts: 1

PostPosted: Sat Jan 17, 2004 11:57 pm    Post subject: Reply with quote

I just wanted to say thank you soooo much for this! This was my very first time installing anything on my site, and not only was I able to install b2 but also thanks to you, i was able to install the smilies in both my comments AND admin panel!

For someone who has never even been able to make sense of the instructions of blogging software before, I was amazed at how smoothly everything went. And thanks to your smilies hack, i could get everything set to my liking! Very Happy
Back to top
View user's profile Send private message
flowerglen



Joined: 27 May 2003
Posts: 24

PostPosted: Sat May 22, 2004 3:16 pm    Post subject: Reply with quote

mine works fine, but when put the smiley before a new line, in the post i get br /> after the smilie. whats up with this? what could be wrong?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6, 7
Page 7 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group