Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Thu Mar 22, 2007 5:27 pm Reply with quote

I would like to provide an option in my calendar module to use the editor in RN2.10.

I glanced at the code, and is it as simple as making a call to wysiwyg_textarea() (or wysiwyg_textarea_html())?

Unfortunately, my current textarea needs an ID attribute, and there doesn't seem to be a way to provide that. I can probably code around that though.

Thanks!

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Thu Mar 22, 2007 8:37 pm Reply with quote

Using wysiwyg in your calendar module would be great.
btw, I just got the latest release and that calendar center-block rocks, Gremmie!
Good job.

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Thu Mar 22, 2007 10:19 pm Reply with quote

Gremmie, if you have not already, you might want to PM kguske for help on this... he may or may not see this as it is kind of buried inside the Modules forum.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Fri Mar 23, 2007 8:33 am Reply with quote

Not sure it will work since the WYSIWYG is implemented through a frame, not a textarea.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
Gremmie







PostPosted: Fri Mar 23, 2007 10:48 am Reply with quote

CodyG, thanks, glad it worked. I'm thinking about your RSVP idea now...

kguske, I'm confused about that. Maybe we are talking about 2 different things. I was looking at the Submit_News module in RN2.10. It just makes a call to one of those functions instead of spitting out it's own textarea. It pretty much has to use a textarea, right? Otherwise how does the info get posted back to the module? I thought I saw in the FCK class that it was echoing out a textarea. Thanks.
 
kguske







PostPosted: Fri Mar 23, 2007 11:23 am Reply with quote

Sorry, I should have been more specific. I meant that it wouldn't work if you required the ID. The WYSIWYG function will output a textarea if the page is being accessed by a search engine or if the editor is turned off.
 
Gremmie







PostPosted: Fri Mar 23, 2007 9:40 pm Reply with quote

Well calling one of those functions seems to work. It is too bad you can't pass in an ID like you do the name and value, but I think I can code around that on my end.
 
kguske







PostPosted: Sat Mar 24, 2007 12:58 am Reply with quote

I'll check it out. Are you using it for some JS function?
 
Gremmie







PostPosted: Sat Mar 24, 2007 10:06 am Reply with quote

I am using a <label> tag with a "for" attribute. Its probably not a big deal, but for completeness it would be nice.
 
Gremmie







PostPosted: Sat Mar 24, 2007 12:03 pm Reply with quote

Here are some more lessons learned:

Without the advanced editor, I called htmlentities when doing preview type things, or editing existing text. With the advanced editor on, you don't do that.

I was also doing nl2br() on text that I was saving without the editor. With the editor this is not needed.

GCalendar is using it's own html filtering because I developed it under 7.9, and I had some doubts about the correctness and efficiency of the 7.9 check_html system. So I maintained my own allowable HTML and attributes. But the advanced editor makes use of a lot more tags. I decided to compromise and if GCalendar admins turn on the advanced editor option I will use whatever check_html facility is available instead of my own. I can trust RavenNukes. Wink

BTW, that editor is awesome! I like how it fixes HTML compliancy errors. Thank you for making it available in RavenNuke. I think it will really be a big win-win for module authors who take advantage of it.
 
kguske







PostPosted: Sat Mar 24, 2007 8:28 pm Reply with quote

In your module, you could check for the existence of the wysiwyg function to determine if nukeWYSIWYG is installed.
 
Gremmie







PostPosted: Tue Apr 17, 2007 7:30 am Reply with quote

I integrated it into GCalendar and it is rocking!

One nagging question though...I could never seem to change the width. It seemed like it was ignoring my width argument to wysiwyg_textarea_html(). However the Submit_News module, etc, always had a very wide frame, much wider than mine. How was that accomplished?
 
montego







PostPosted: Tue Apr 17, 2007 7:31 am Reply with quote

Check your table widths. If you use 100%, it should expand to the full size of that table.

I know. I had the same question of Kguske many moons ago, and this was his response. Of course, he was right. Smile (At least it was so for the HTML Newsletter...)
 
kevinkap
Involved
Involved



Joined: Apr 22, 2006
Posts: 356

PostPosted: Tue Apr 24, 2007 5:16 pm Reply with quote

I love it gremmie.

great work


Thanks.

_________________
Kevin Kappes 
View user's profile Send private message
kevinkap







PostPosted: Tue Apr 24, 2007 5:45 pm Reply with quote

One suggestion that was given to me by montego when I was trying to clean up a module I use on one site.

1) We changed many double-quotes to single-quotes as in PHP, this is a much, much, much quicker, performance-wise, way of assigning string values. Using double-quotes forces PHP to analyze/parse the string, looking for variables to replace. Even if there are no variables, it still has to parse through it all. Very slow. But, it served no other function than speed.
 
kevinkap







PostPosted: Tue Apr 24, 2007 6:08 pm Reply with quote

I am sure this is in the wrong place. Not to butcher your work, but I changed the edit for the mainfile.php to meet what is being used. I hope you do not mind.

This is what I made the code addition to look like.

$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_gcal_event WHERE approved = 0'));
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=gcalendar">'._CALENDAREVENTS.'</a>: '.$num.'<br />';

Then in english.php I added: define('_CALENDAREVENTS','Calendar Events');

Once again, I hope you do not take offense to it. I am really suprised that I managed to get it to work as I am not very good at it.
 
Gremmie







PostPosted: Tue Apr 24, 2007 7:15 pm Reply with quote

Nice job.
 
kguske







PostPosted: Tue Apr 24, 2007 9:03 pm Reply with quote

Keep up the great work! Thanks to Montego and Raven for the performance recommendations - it just keeps getting better...
 
Gremmie







PostPosted: Wed Apr 25, 2007 9:45 am Reply with quote

I should mention that the rest of GCalendar is coded with a preference for single quotes. The changes to mainfile.php were based on the PHP-Nuke 7.9 code, which is still using double quotes. I did not feel it was necessary to add a language constant in there since this is an add-on and the admin will know what to put there for his own native language. And I didn't want to introduce another point where the novice admin could mess things up. To be complete, you need to add _CALENDAREVENTS to all the language files, and I didn't think that was worth it.
 
hunnydusst
New Member
New Member



Joined: Apr 05, 2007
Posts: 18

PostPosted: Wed Jun 06, 2007 4:30 pm Reply with quote

Gremmie........ it's BEAUUUUUUUUUTIFUL!!!!! Awesome work. My users are lovin it! I particularly like that I can view just one type of event at a time if I want.

This may be off the wall..... but is there a way to make it possible to view the entire year and make THAT printable????
 
View user's profile Send private message
Gremmie







PostPosted: Wed Jun 06, 2007 6:30 pm Reply with quote

Thank you.

I will add the yearly view to the feature tracker. For more GCalendar support, head over to: [ Only registered users can see links on this board! Get registered or login! ]
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©