Rich text editor (like VB!)

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-01-2007, 02:11 PM
Casual Pligger
Pligg Version: 9.7
Pligg Template: DigMyHonda.com
 
Join Date: Sep 2007
Location: MA
Posts: 33
Send a message via AIM to Lostshootingstar
I'm sure this has been brought up before, but i searched and didn't find anything worth while.

I'm trying to shift my pligg site "business model" from a link aggregation site, to a more "unique content" site.

One thing that really makes this difficult is the lack of formating options for the story text. HTML is kind of a sloppy way for users to generate unique content.

I would really love to implement something like Vbulletin has.

90% of my traffic comes from automotive forums, and everyone is familiar with BB code and how to format text, insert images, etc, so i'd like to proivde them with the same kind of interface.

Any tips on where to start with this? any PHP frameworks available for this kind of thing? should i just look at PHPbb or Vbulletin code and figure it out myself?

Also, does anyone know how VB stores this "rich text" in the sql database? does it parse the [ BBcode ] tags at submission time, or at display time?

Any information would be appreciated!

-Eric
Reply With Quote
  #2 (permalink)  
Old 11-01-2007, 11:36 PM
Casual Pligger
Pligg Version: 9.7
Pligg Template: DigMyHonda.com
 
Join Date: Sep 2007
Location: MA
Posts: 33
Send a message via AIM to Lostshootingstar
For anyone looking to do this:

I found a great, really SIMPLE bbcode parser here:
Simple BB Code Parser - Web Tech 101

Its really easy to use.

1. copy the simple_bb_code.php file to the libs/ folder

2. Add the following to link.php
PHP Code:

/* Add this code at the top of link.php, BEFORE the class link { .. } declaration */
require_once('simple_bb_code.php');


/* Find this code */
if($type == "full"){
    
$smarty->assign('story_content'$this->content );
}

/* replace it with this */
$bb = new Simple_BB_Code();

if(
$type == "full"){
    
$smarty->assign('story_content'$bb->parse($this->content) );

Thats it! I know have fully functional BBcode parsing.

I'm now working on an attractive text editor for the submission process.
Reply With Quote
  #3 (permalink)  
Old 11-02-2007, 01:51 PM
Casual Pligger
Pligg Version: 9.7
Pligg Template: DigMyHonda.com
 
Join Date: Sep 2007
Location: MA
Posts: 33
Send a message via AIM to Lostshootingstar
Here is a screen shot. Its not LIVE yet (there are still a bunch of things i need to work out). but it works!

Things to do:
figure what to do with summary: The BBcode is being truncated at 150 characters, which causes problems (obviously). not sure how i want to handle this yet.
Attached Thumbnails
Rich text editor (like VB!)-screenshot-1.png  
Reply With Quote
  #4 (permalink)  
Old 11-04-2007, 03:23 PM
Casual Pligger
Pligg Version: 9.7
Pligg Template: DigMyHonda.com
 
Join Date: Sep 2007
Location: MA
Posts: 33
Send a message via AIM to Lostshootingstar
Finished product: screenshot attached.
Attached Thumbnails
Rich text editor (like VB!)-screenshot-2.png  
Reply With Quote
  #5 (permalink)  
Old 09-19-2008, 06:09 PM
New Pligger
Pligg Version: 9.9.5
 
Join Date: Sep 2008
Posts: 1
But did you achieved to the last product?

What are all the steps?
Reply With Quote
  #6 (permalink)  
Old 09-19-2008, 06:18 PM
catchpen's Avatar
Pligg Donor/Coder
 
Join Date: Feb 2008
Posts: 185
Quote:
Originally Posted by seriestv View Post
But did you achieved to the last product?

What are all the steps?
http://forums.pligg.com/pligg-mods/5...-step-2-a.html

nicedit is a good one too no overkill

http://forums.pligg.com/pligg-mods/5...html#post56217
Reply With Quote
  #7 (permalink)  
Old 09-19-2008, 06:35 PM
Jessemn's Avatar
Casual Pligger
 
Join Date: Jun 2008
Location: Canada
Posts: 56
Have you thought about adding this sort of thing to the comments (ie. adding it to the story page)?

I would enjoy having a comment system that was closer to that of a forum, using bbcode rather than its html equivalent.

This seems like it shouldn't bee too difficult to implement... hmmm... I'll try to take a look at this over the weekend. Unless any of you have any other thoughts.

soLinkable - I know you're going to visit my site.
Reply With Quote
  #8 (permalink)  
Old 10-19-2008, 07:49 PM
Pligg Donor
 
Join Date: Aug 2008
Posts: 39
Quote:
Originally Posted by Lostshootingstar View Post
For anyone looking to do this:

I found a great, really SIMPLE bbcode parser here:
Simple BB Code Parser - Web Tech 101

Its really easy to use.

1. copy the simple_bb_code.php file to the libs/ folder

2. Add the following to link.php

how do I add in support so that it filters properly in the link summary? the story page looks fine, but the story summary displays the BBCode.
Reply With Quote
  #9 (permalink)  
Old 10-20-2008, 06:51 AM
New Pligger
 
Join Date: Feb 2008
Posts: 13
Thanks for the snippet bud.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show category keywords as text on the site? gnalkit Questions and Comments 4 11-26-2008 06:17 AM
Rich text Editor Lostshootingstar Questions and Comments 1 01-08-2008 07:57 PM
9.6 error xbizsky Questions and Comments 28 07-04-2007 04:54 AM
Need help setting text in header dinki Questions and Comments 0 06-30-2007 06:32 PM
Another vB integration question Torque Questions and Comments 4 07-13-2006 11:01 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development