Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
show-topic
Make WYSIWYG comment form with Andy's code
Avatar
Truden
Rookie
Free Members
sp_UserOfflineSmall Offline
Sep 3, 2008 - 12:46 pm

Simple:Press Forum is full of wonderfully implemented ideas, and the best thing about it is that some of them you can "steal" and use in many other places.
I did it.
How?

If you have Simple:Press Forum installed in your weblog:

OPEN /simple-forum/sf-tinyinit.php

CHANGE line 11 from

elements : "newtopicpost,editpostcontent,newpmpost",

to

elements : "comment",

presuming that your comments textarea uses the default "comment" name and id

CHANGE line 17 from

language : "<?php echo(SFLANG); ?>",to

language : "en",

or the initials of your language if it is present in the language pack of TinyMCE.

DELETE line 18.
SAVE the file as sf-tinyinit_comments.php
Upload it in your theme directory.

OPEN header.php from your theme directory.

before

<?php wp_head(); ?>

ADD

<?php
    if (is_single()){   ?>
      <script type="text/javascript" src="http://YOUR-SITE.COM/wp-conten.....iny_mce.js"></script>
 <?php   include (TEMPLATEPATH . '/sf-tinyinit_comments.php'); }
 ?>
 

Change "YOUR-SITE.COM" from the above code with your domain name.
If the path to tiny_mce.js is different than the above, change the address to match.
 UPLOAD the changed header.php in its theme directory.

 THAT is ALL (I think).

 Navigate to a single page in your weblog and see your new looking comment form.

DEMO

(Please do not post DEMO-comments in the "DEMO" page.)

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 3, 2008 - 1:14 pm

Hey - having fun eh? Yes - this will work.... And it's a nice tool to use for the comment editor as well.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Truden
Rookie
Free Members
sp_UserOfflineSmall Offline
Sep 3, 2008 - 1:26 pm

Yellow Swordfish said:

Hey - having fun eh?


Absolutely! Laughing

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 3, 2008 - 1:54 pm

I like reuse of our stuff as there are other plugins in that do that, but reuse is good... cuts down on overhead... thanks truden

Avatar
Truden
Rookie
Free Members
sp_UserOfflineSmall Offline
Sep 3, 2008 - 2:04 pm

I should thank you, Mr Papa.

The pleasure was entirely mine.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626