Welcome to Geeklog, Anonymous Thursday, April 18 2024 @ 03:36 am EDT
Geeklog Forums
Extending the Journal Plugin?
Just a random thought I had tonight... would anybody know the degree of difficulty editing the Journal plugin so that it can include smiles, URL\'s and images in the posts? Similar to posting a story in GL w/htmlarea or the forum plugin.
I was able to edit the plugins/journal/functions.inc and had htmlarea taking control of the textarea, however, saving the journal entry resulted in a blank page and that entry just not saving.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
6
5
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
It filters all HTML somewhere (search for \"strip_tags\"). This should probably be changed to call Geeklog\'s COM_checkHTML() instead.
From there, it shouldn\'t be to complicated to replace the editor with something like HTMLarea. Just make sure to include all hidden and visible input fields of the original editor.
bye, Dirk
5
6
Quote
Status: offline
destr0yr
Forum User
Full Member
Registered: 07/06/02
Posts: 324
Quote by Dirk: It filters all HTML somewhere (search for "strip_tags"). This should probably be changed to call Geeklog's COM_checkHTML() instead.
it looks like it passed through the following line:
Text Formatted Code
$je_summary = addslashes(htmlspecialchars(strip_tags(COM_checkWords($je_summary))));
Text Formatted Code
$je_summary = addslashes(htmlspecialchars(COM_checkWords($je_summary)));
Text Formatted Code
$retval .= nl2br(stripslashes($A["je_text"]));-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
3
8
Quote
Status: offline
destr0yr
Forum User
Full Member
Registered: 07/06/02
Posts: 324
Quote by Dirk: You were on the right track - htmlspecialchars converts
$retval .= nl2br($A["je_text"]); [/code] However, i get the same result...
a view source shows the following...
Text Formatted Code <br><P><STRONG>blah blah</STRONG></P><br />
<P> <A href="http://www.okanagangirlz.com">http://www.okanagangirlz.com</A></P><br />
i'm trying to understand it... but @ the moment i dont see how the htmlspecialchars will help.
pls advise.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
6
7
Quote
Status: offline
destr0yr
Forum User
Full Member
Registered: 07/06/02
Posts: 324
Quote by Dirk: I meant that you should remove the call to that function
i did, and it still doesn\'t work?! plain and simple, this is what i have:
$retval .= nl2br($A[\"je_text\"]);
but displaying the journal entry still shows the code on the page. ![Cool Cool](https://www.geeklog.net/forum/image_set/pixel.gif)
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
7
5
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
In function savejournalentry() I now haveand it works as expected ...
Oh, and of course you need to test that with new entries.
bye, Dirk
Text Formatted Code
$je_text = addslashes(COM_checkWords($je_text));
4
8
Quote
i apologize for being such an inquisitive id10t.
must come naturally.
Thank you Dirk.
p.s.: this somewhat breaks the journal block, but i wont bug ya about that...
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
![Wink Wink](https://www.geeklog.net/forum/image_set/pixel.gif)
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
6
6
Quote
DJDevon3
Anonymous
I'm looking for something that extends the Journal plugin as well so it will include a photo that a user wants to put into the journal using a browse upload or even html. Yes, adding smileys and images would make the journal script one that every site would probably use. I can't code pure gl to save my life so could someone who knows gl take a shot at doing it? Peace.
8
6
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
If you have glMessenger installed you can use the smilie function and benefit from the online smilie library editor. Forum 2.3 will also detect if glMessenger is installed and allow you to use the glMessenger smilie functions.
The following code handles replacing the emoticon
with the HTML img code.
$message = msg_replaceEmoticons( $message );
Additionally this funtions will display all the unique smilies in your library and can be used in your posting journal page or pop-up smilie help.
echo msg_showsmilies();
Geeklog components by PortalParts -- www.portalparts.com
The following code handles replacing the emoticon
![Smile](images/smilies/smile.gif)
Text Formatted Code
$message = msg_replaceEmoticons( $message );
Additionally this funtions will display all the unique smilies in your library and can be used in your posting journal page or pop-up smilie help.
Text Formatted Code
echo msg_showsmilies();
Geeklog components by PortalParts -- www.portalparts.com
6
8
Quote
All times are EDT. The time is now 03:36 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content