Jump to content


[Snippet] RTE Blogger


  • You cannot reply to this topic
19 replies to this topic

#1 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 19 July 2007 - 09:24 PM

File Name: RTE Blogger
File Submitter: Ralph
File Submitted: 19 Jul 2007
File Category: Blogs & News

NOTE: This snippet requires the RTE (Rich Text Editor) WYSIWYG editor snippet in order to work. The RTE snippet is located both here in this section of the snippet library as well as in your installation as manager/media/rte/RTE.phps which is virtually identical to the file here in the library. This snippet only allows management tasks based on user role permissions which means that editors must be authenticated via front end login. Site visitors can only view existing posts.

// RTE-Blogger Snippet
// Created By: Ralph A. Dahlgren
// Modified: 2007-03-22 for both FURL and non-FURL support and using RTE WYSIWYG
// Modified: 2007-04-17 to make better use of API functions
// Modified: 2007-07-06 for more consistent logic flow of passed snippet parameters
// Purpose: Creates and/or maintains a table of blog entries categorized by document id and can also be used to maintain multiple blog tables
// Use: [!RTE-Blogger!] - uses the table named etoblog for storage
// Use: [!RTE-Blogger?blog=blogtable!] - uses the table named blogtable for storage
/* Use:
[!RTE-Blogger
?blog=blogtable
&blog_id=123
&showEditor=true
&showAuthor=true
&showDate=true
&dateFormat=m/d/Y
&editDate=true
&authorOnly=false
&users=user1,user2,user3
&stoptags=true
!] - uses all available options
*/


Click here to download this file

#2 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 20 July 2007 - 11:19 AM

This looks promising! As the first one to try it, I installed it, installed the "RTE" snippet, then checked to make sure that I had the RTE folder in manager/media, then checked that I had rte.phps in there. All checked out good. PHP is enabled in my etomite install (near the bottom of the index file.) I assumed that would be necessary too.

I created a new document, placed in the snippet call, and I get a PHP parse error. Am I missing something?
PHP error debug
  Error: 	mysql_select_db(): supplied argument is not a valid MySQL-Link resource	 
  Error type/ Nr.: 	Warning - 2	 
  File: 	/home/public_html/index.php	 
  Line: 	1605	 
  Line 1605 source: 	$selected = mysql_select_db($dbase,$this->rs) or die(mysql_error());

Thanks :)

Edited by cathode, 20 July 2007 - 11:24 AM.


#3 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 20 July 2007 - 01:10 PM

View Postcathode, on Jul 20 2007, 07:19 AM, said:

PHP error debug
  Error: 	mysql_select_db(): supplied argument is not a valid MySQL-Link resource	 
  Error type/ Nr.: 	Warning - 2	 
  File: 	/home/public_html/index.php	 
  Line: 	1605	 
  Line 1605 source: 	$selected = mysql_select_db($dbase,$this->rs) or die(mysql_error());
It appears that you are having a problem with the intTableExists() API function - something I thought I had fully resolved for the 0.6.1.4 release... If you create the table manually you shouldn't have any additional problems... If the problem persists, then you might need to bypass the code that tests for table existence...

#4 Guest_paulg_*

  • Guests

Posted 26 July 2007 - 12:12 PM

I've just tried to install this snippet and use it. Created and saved the two snippets. Ensured that the RTE editor is installed and working within manager. Placed snippet call
[!RTE-Blogger!]
in this page http://www.cwanetwork.org.uk/index.php?id=169 There are no error messages, but nothing is rendered (apart for the other content on the page.)

Checked that the table had been created. Found one previously created by the old Blogger snippet. Dropped the table and then checked that reloading the page created the table. This seems OK. Still nothing rendering on the page to allow anyone to post

0.6.1.4
PHP Version 4.4.7
Any thoughts?

Paul

#5 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 26 July 2007 - 01:09 PM

View Postpaulg, on Jul 26 2007, 08:12 AM, said:

I've just tried to install this snippet and use it. Created and saved the two snippets. Ensured that the RTE editor is installed and working within manager. Placed snippet call
[!RTE-Blogger!]
in this page http://www.cwanetwork.org.uk/index.php?id=169 There are no error messages, but nothing is rendered (apart for the other content on the page.)

Checked that the table had been created. Found one previously created by the old Blogger snippet. Dropped the table and then checked that reloading the page created the table. This seems OK. Still nothing rendering on the page to allow anyone to post

0.6.1.4
PHP Version 4.4.7
Any thoughts?

Paul
Define "anyone"... Are you referring to "anyone authenticated" or "anyone in general"...???

There might be a slight glitch in the code which can be resolved by adding [?|&]c=n to the URL so you can add an initial entry... As I thought I had mentioned, but maybe I didn't, this code might need some work but it runs flawlessly on my own development site and suits my individual needs... But, then again, I wrote the code so I can always manage to kick-start it without even thinking...

This snippet also only allows posts by authenticated users so if you aren't logged in to the front end you won't see anything at all if there are no posts...

#6 Guest_paulg_*

  • Guests

Posted 26 July 2007 - 01:29 PM

View PostRalph, on Jul 26 2007, 02:09 PM, said:

This snippet also only allows posts by authenticated users so if you aren't logged in to the front end you won't see anything at all if there are no posts...
I think that explains it: I hadn't realised only authenticated users could post. I now see that your initial post says so - but I didn't identify "editor" as meaning "someone who wants to post a comment"! So far I've shied away from implementing front-end log-in as I use the PasswordProtect snippet to keep closed pages closed... I guess it may be time I looked into it (and then persuade my 40 odd members that they want another username and password to forget... (Just read through the pinned thread on this and remembered why I chickened out...)

Thanks - and sorry for the waste of time.

Paul

Edited by paulg, 26 July 2007 - 01:54 PM.


#7 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 26 July 2007 - 02:58 PM

@paulg

Feel free to hack away at the code to make it do whatever you need... You could probably modify it to be wide open if you are a glutton for punishment... Or you can implement an alternative authentication method that you are more comfortable with...

#8 Oppdragnemo

    Etomite Forum Newbie

  • Member
  • 30 posts

Posted 06 September 2007 - 05:08 PM

Hi!

I can’t get his snippet to work.
I have created the RTE snippet and RTE-Blogger snippet and I’m using Authenticated_visitor snippet for frontend login.
Etomite installation: 0.6.1 Final PL:4.

My problem is that I can not see the RTE editor when I’m authenticated(Using site admin). I can see the title field and can create/edit/delete bloggs with a title. When I just call the [!RTE!] snippet the RTE editor is visible. But when I’m calling [!RTE-Blogger?showEditor=true&authorOnly=true&users=pamm,pmma!] only title field is visible. Edit, delete, save etc is working.

So I could create I blogg with a title, but that’s it.

Am I missing something here (except my English)?.
:-)

#9 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 06 September 2007 - 05:26 PM

View PostOppdragnemo, on Sep 6 2007, 01:08 PM, said:

Hi!

I can’t get his snippet to work.
I have created the RTE snippet and RTE-Blogger snippet and I’m using Authenticated_visitor snippet for frontend login.
Etomite installation: 0.6.1 Final PL:4.

My problem is that I can not see the RTE editor when I’m authenticated(Using site admin). I can see the title field and can create/edit/delete bloggs with a title. When I just call the [!RTE!] snippet the RTE editor is visible. But when I’m calling [!RTE-Blogger?showEditor=true&authorOnly=true&users=pamm,pmma!] only title field is visible. Edit, delete, save etc is working.

So I could create I blogg with a title, but that’s it.

Am I missing something here (except my English)?.
:-)
There might be some logic issues with the snippet... This was a work-in-progress when released and I seem to recall having similar issues with my laptop and IE7... I'm not sure how soon I will be able to check into this issue, however...

#10 Oppdragnemo

    Etomite Forum Newbie

  • Member
  • 30 posts

Posted 20 October 2007 - 09:28 AM

Is this snippet working?

#11 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 10 May 2008 - 12:24 PM

Quote

Is this snippet working?
I realise that this is an old post, however I just wanted to confirm that this snippet does work and is compatible with Etomite V1.0.

The only tweaking necessary was to copy and paste the sql query into PHPMyAdmin to manually create the table (there still seems to be issues with intTableExists in V1.0), and installing RTE, the snippet works fine.

#12 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 10 May 2008 - 01:42 PM

View PostCris D., on May 10 2008, 09:24 AM, said:

I realise that this is an old post, however I just wanted to confirm that this snippet does work and is compatible with Etomite V1.0.

The only tweaking necessary was to copy and paste the sql query into PHPMyAdmin to manually create the table (there still seems to be issues with intTableExists in V1.0), and installing RTE, the snippet works fine.

I can further confirm that this snippet works as it renders the news on the front page of my development site which, of course, uses Prelude v1.0...

As far as the intTableExists() issue, I'm not sure if it is a matter of its implementaion in this snippet or if it's simply a matter of there not being a perfect solution for this API function... Every time is appears to be working flawlessly it decides to break on one server or another...

#13 tomariwa

    Etomite Forum Newbie

  • Member
  • 20 posts

Posted 15 May 2008 - 12:53 PM

Hmm, something`s not right here. After implementing this blog last night (norwegian time), I got it working as it should for a brief moment, but not flawlessly however, as the blog-entries I testet only worked now and then. Some got entered, some did not. Today when I startet further testings, the RTE wysiwyg editor suddenly wouldn`t show anymore. The text field is there, but the editing icons are gone. This happens both in Opera, FF and IE. Last night they worked in Opera, but not in FF. I don`t get this. Any clues?

I also have one more question. Is`t this snippet supposed to show editing buttons beside the Add Entry and Cancel (edit, delete ie), as default? I can only see the two mentioned.

#14 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 15 May 2008 - 01:09 PM

View Posttomariwa, on May 15 2008, 09:53 AM, said:

Hmm, something`s not right here. After implementing this blog last night (norwegian time), I got it working as it should for a brief moment, but not flawlessly however, as the blog-entries I testet only worked now and then. Some got entered, some did not. Today when I startet further testings, the RTE wysiwyg editor suddenly wouldn`t show anymore. The text field is there, but the editing icons are gone. This happens both in Opera, FF and IE. Last night they worked in Opera, but not in FF. I don`t get this. Any clues?

I also have one more question. Is`t this snippet supposed to show editing buttons beside the Add Entry and Cancel (edit, delete ie), as default? I can only see the two mentioned.


The edit buttons are displayed, or not, based on user role permissions... If permissions are not enabled then all buttons should be visible to all users... As far as RTE randomly displaying, this is an issue I have never encountered and I have variations of this snippet running on multiple sites so it's new to me... Is it possible that this is a caching issue...??? I generally don't cache the document holding the snippet call and also use non-cachable snippet call tags, [!...!], just to be safe... Check these two items and let us know if you still have problems...

#15 tomariwa

    Etomite Forum Newbie

  • Member
  • 20 posts

Posted 15 May 2008 - 02:20 PM

Here is what I just did. I created a new "blog" role, a blog document group and a blog usergroup, assigned the document to the group, and a user with the new role. I then changed permission on my blogg-document to match the doc. group. In role I gave the role all read, create, save, edit and delete permissions. The document is non-cacheable and I use the [! !] snippet command.

When testing this, the new user can view and post in the blogg, other members can only view. That`s all fine, but I am still not able to edit/delete posts. There are no buttons to do so, only Add Entry and Cancel. RTE wysiwyg editing icons are still not showing as well. Adding entries work from time to time....

#16 bwoodsdesign

    Likes Etomite Forums!

  • Member
  • PipPip
  • 236 posts

Posted 18 June 2009 - 03:59 PM

Hmm. Came here to see if there were any online examples. Kinda disappointed, wanted to show the Eto blog snippet in action to a prospective client.

Anyone have any examples or can confirm how the blog works? Besides posting a new document in a certain folder (I'm assuming), and having comments to approve?

If a demo is not available, a brief explanation of its features and what it can/cannot do, would be much appreciated. Didn't see any of that in this topic yet.

#17 bwoodsdesign

    Likes Etomite Forums!

  • Member
  • PipPip
  • 236 posts

Posted 22 June 2009 - 08:11 PM

Anyone? Bueller? I have a prospective client anxiously awaiting info regarding having a blog in the Etomite system (all in one)

I just need to know how it works and if so, how easy it is to install.

I may just have to try it out myself on an existing install.

Thanks,

-Bobbi Jo

View Postbwoodsdesign, on Jun 18 2009, 10:59 AM, said:

Hmm. Came here to see if there were any online examples. Kinda disappointed, wanted to show the Eto blog snippet in action to a prospective client.

Anyone have any examples or can confirm how the blog works? Besides posting a new document in a certain folder (I'm assuming), and having comments to approve?

If a demo is not available, a brief explanation of its features and what it can/cannot do, would be much appreciated. Didn't see any of that in this topic yet.


#18 bwoodsdesign

    Likes Etomite Forums!

  • Member
  • PipPip
  • 236 posts

Posted 22 June 2009 - 09:53 PM

OK

I just set this up at an existing Etomite site, in a published folder within the Repository (not sure if that's what's causing the issue)

...and got this:
« Error »
Etomite encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed »
	  SQL: CREATE TABLE `etomite_etoblog` ( `entryid` int(10) unsigned NOT NULL auto_increment, `blog_id` int(10) unsigned NOT NULL default '0', `title` text NOT NULL, `text` text NOT NULL, `internalKey` int(10) NOT NULL default '0', `date` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`entryid`) ) TYPE=MyISAM;
	  [Copy SQL to ClipBoard]
 
Parser timing
  MySQL: 	0.0019 s s	(3 Requests)
  PHP: 	0.0270 s s	 
  Total: 	0.0289 s s

Should I be putting this somewhere else? I created a document, called it Test blog and placed the snippet call into the page directly.

#19 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 23 June 2009 - 10:09 AM

That could be the intTableExists API malfunctioning. The table may have been created but it's still trying to create it. Persevere with this if you want, but you may like to consider etoComment that is based on this snippet has many of these later bugs sorted, allows approvals and has a demo. Markup is in a separate html chunk so you can make it look howevver you like. I hesitated from recommending it earlier because you may have already checked it out and I think it's rude suggesting another snippet from inside another author's support thread, but it seems you really want to get one going and it may suit your needs.

However, if you do want help with this RTEBlogger version, I'm sure Ralph will assist...

Oh, and here's Ralph's demo for this snippet.

Edited by Cris D., 23 June 2009 - 10:23 AM.


#20 bwoodsdesign

    Likes Etomite Forums!

  • Member
  • PipPip
  • 236 posts

Posted 23 June 2009 - 03:50 PM

Thanks, Cris, for the reply. I will check out etoComment, no I hadn't heard of it before. Frankly I would bypass it if I did anyway, because to me, the name of that snippet does not scream "blog" to me.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users