Part of the EllisLab Network
   
 
Smiley issue
Posted: 03 August 2007 10:45 PM   [ Ignore ]  
Summer Student
Total Posts:  6
Joined  07-13-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 02:21 PM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2515
Joined  06-11-2007

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

 Signature 

Blog | Twitter | GitHub
————————-
CodeIgniter 2: Everything you need to know
————————
PyroCMS - open source modular CMS built with CodeIgniter
CleverAndy - get money for un-used concept designs
————————
Libraries: Asset, Dwoo, Cache, cURL, CLI, REST, Template

Profile
 
 
Posted: 04 August 2007 10:15 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  6
Joined  07-13-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 05:42 AM   [ Ignore ]   [ # 3 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2515
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
————————-
CodeIgniter 2: Everything you need to know
————————
PyroCMS - open source modular CMS built with CodeIgniter
CleverAndy - get money for un-used concept designs
————————
Libraries: Asset, Dwoo, Cache, cURL, CLI, REST, Template

Profile
 
 
   
 
 
‹‹ layouts?      Two "submit" inputs ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120243 Total Logged-in Users: 58
Total Topics: 126374 Total Anonymous Users: 2
Total Replies: 664627 Total Guests: 442
Total Posts: 791001    
Members ( View Memberlist )