Part of the EllisLab Network
   
 
Smiley issue
Posted: 03 August 2007 11:45 PM   [ Ignore ]  
Summer Student
Total Posts:  6
Joined  07-14-2007

Hello All

According to the user guide, I’ve created smileys.php and smiley_view.php.
Everything works fine but instead of display confused.gif into comments, ‘:-S’ is displayed.

is it possible to immediately insert confused.gif instead of ‘:-S’ ?

Profile
 
 
Posted: 04 August 2007 03:21 PM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3153
Joined  06-11-2007

Please post your code here so we can see whats going wrong.

 Signature 

————————
Blog | Twitter | GitHub | BitBucket
————————-
PyroCMS - open source modular CMS built with CodeIgniter
PancakeApp - Simple, hosted invoicing/w project management

Profile
 
 
Posted: 04 August 2007 11:15 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  6
Joined  07-14-2007

Hello

Below is the code.
I find the problem also happens in this forum, I choose surprised smiley and ‘:wow:’ displayed
but after I press Preview Post, it display the smiley gif correctly. Is it better immediately display smiley gif instead of ‘:wow:’ otherwise user will be confused. 

smileys.php

<?php

class Smileys extends Controller {

  function Smileys()
  {
      parent::Controller();
  }
 
  function index()
  {
      $this->load->helper(‘smiley’);
      $this->load->library(‘table’);
     
      $image_array = get_clickable_smileys(‘http://localhost/images/smileys/’);

      $col_array = $this->table->make_columns($image_array, 12);     
       
      $data[‘smiley_table’] = $this->table->generate($col_array);
     
      $this->load->view(‘smiley_view’, $data);
  }
 

smiley_view.php

<html>
<head>
<title>Smileys</title>

<?php echo js_insert_smiley(‘blog’, ‘comments’); ?>

</head>
<body>

<form name=“blog”>
<textarea name=“comments” cols=“40” rows=“4”></textarea>
</form>

Click to insert a smiley!

<?php echo $smiley_table; ?>
<?php
$str = ‘Here are some simileys: grin wink’; $str = parse_smileys($str, “http://localhost/images/smileys/”); echo $str;

?>
</body>
</html>

Profile
 
 
Posted: 05 August 2007 06:42 AM   [ Ignore ]   [ # 3 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3153
Joined  06-11-2007

Oh I see, instead of them only showing when you submit/preview the post, you want them to show up as soon as they are entered. You want a WYSIWYG editot for that, try:

http://tinymce.moxiecode.com/

 Signature 

————————
Blog | Twitter | GitHub | BitBucket
————————-
PyroCMS - open source modular CMS built with CodeIgniter
PancakeApp - Simple, hosted invoicing/w project management

Profile
 
 
   
 
 
‹‹ layouts?      Two "submit" inputs ››