[Snippet] RTE Blogger
#1
Posted 19 July 2007 - 09:24 PM
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
Posted 20 July 2007 - 11:19 AM
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
Posted 20 July 2007 - 01:10 PM
cathode, 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());
#4 Guest_paulg_*
Posted 26 July 2007 - 12:12 PM
[!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
Posted 26 July 2007 - 01:09 PM
paulg, on Jul 26 2007, 08:12 AM, said:
[!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
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_*
Posted 26 July 2007 - 01:29 PM
Ralph, on Jul 26 2007, 02:09 PM, said:
Thanks - and sorry for the waste of time.
Paul
Edited by paulg, 26 July 2007 - 01:54 PM.
#7
Posted 26 July 2007 - 02:58 PM
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
Posted 06 September 2007 - 05:08 PM
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
Posted 06 September 2007 - 05:26 PM
Oppdragnemo, on Sep 6 2007, 01:08 PM, said:
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)?.
:-)
#10
Posted 20 October 2007 - 09:28 AM
#11
Posted 10 May 2008 - 12:24 PM
Quote
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
Posted 10 May 2008 - 01:42 PM
Cris D., on May 10 2008, 09:24 AM, said:
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
Posted 15 May 2008 - 12:53 PM
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
Posted 15 May 2008 - 01:09 PM
tomariwa, on May 15 2008, 09:53 AM, said:
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
Posted 15 May 2008 - 02:20 PM
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
Posted 18 June 2009 - 03:59 PM
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
Posted 22 June 2009 - 08:11 PM
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
bwoodsdesign, on Jun 18 2009, 10:59 AM, said:
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
Posted 22 June 2009 - 09:53 PM
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
Posted 23 June 2009 - 10:09 AM
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
Posted 23 June 2009 - 03:50 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











