Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Simple Guestbook module


Go to End


85 Posts   50232 Views

Avatar
Euphemismus

Community Member, 82 Posts

8 April 2010 at 6:32am

Hi,
no problem :-)
As far as I can see, there's following things:

address field
Should be no problem: Add a new field, store in the db, make it visible on template only if ADMIN

checkboxes
This sounds like there has to be some kind of logic behind this. "I'm interested in further informations, please get in touch" sound like the admin(s) should be informed of such things. Otherwise you'd have to check manually... Not so easy

publish comment
What do you mean? At the moment you can choose to have all entries "disabled" and not showing on the guestbook until "enabled" - except the user is a registered and logged-in member. Comments on the Entries are only possible for logged in users to write.

I'm not sure if the guestbook is the right thing to use as a discussion board. That's normally done with a forum where you can even have multiple threads etc. Doing this with the GB would mean a lot of modification away from the basic purpose...
One thing you made me aware of is this: Maybe I'll implement a possibility to add like 4 or 5 additional form fields which could be enabled and labelled as desired to catch some more user data and be shown on the GB. I'd have to think about maybe having this a bit more dynamic like in the userforms module where you can have different types of fields, boxes, radiobuttons etc. as a form. Could be interesting, especially when it needs to be multilingual. But adding further validation or actions away from the basic things like isNumeric, notEmpty etc. should be done as a customization and not within the GB development.

By the way:
Are there any feature requests (general question)? :-)
Because at the moment I think I'm done with 2.4rc1 compatibility issues - found no more bugs so far and since SilverStripe announce there will be no more API changes from this development stage on... (for 2.4, of course) ... I'm ready for some more developing ;-)

Avatar
Euphemismus

Community Member, 82 Posts

4 June 2010 at 1:43am

Small update on the Guestbook.
I've moved the version to a straigt 1.0 ;-)

  • Thanks to a tester (sorry, no name given :-( ), a XSS vulnerability was discovered and fixed
  • Some smaller fixes
  • I've reworked the backend-view of the "guestbook" tab (modeladmin)
  • Splitted the "Entries" tab into "Config" and "Entries" for better useability
  • Removed the 2.3 support

My ideas for 1.0.1:

  • I'll add some icons instead of the plain text links in the template for add/edit/delete/spam etc. Maybe it will become an "admin" box that appears when "admin" link is clicked or sth like that.
  • There will be frontend-editing capabilities for admins (entries and comments)

And as always: Every idea, comment and functional enhancment is highly welcome!

Regards,
Marc

Avatar
allanaa

Community Member, 10 Posts

10 June 2010 at 1:46am

Just downloaded and installed on a site I am working on. Great module! Good job Euphemismus!!

This might be a stupid question so please forgive me, but what does checking the 'new entries need activation' actually do. I assumed it would give the admin the option to approve the guestbook entry before it gets posted for everyone to view. However when I check it nothing changes. (if this is not the case then I think this would be a good feature to add if possible)

Something I would love to see is being able to edit the entries in the admin section. It would be nice to be able to mark as spam and delete them from there as well.

Avatar
Euphemismus

Community Member, 82 Posts

10 June 2010 at 2:01am

Hi allanaa,

thank you ;-)
If you haven't enabled the "..need activation" feature, all previous entries to the guestbook are already "activated". From the point you've enabled, all new entries don't have the "activated" flag.
This area might be something to improve in the future - maybe add another table to the backend view where you can see the entries that need activation.

You can mark entries as spam in the frontend when logged in as admin - I'm currently working on some additions there, so you can also edit entries there. In the backend view it's a bit complicated because the complex table field seems to have problems with the data structure I use. Maybe I can improve there, too. In the meantime, you can edit/mark as spam in the "Guestbook" section of the CMS.

Please have a look @ the guestbook module within the next few days - there will be a smaller release, since I've found a bug in the email encryption.

Regards,
Marc

Avatar
allanaa

Community Member, 10 Posts

10 June 2010 at 4:17am

Hey, thanks so much for the reply!!

I was just looking at the actual guestbook page (Config and entries). With everything going on, I didn't notice the new tab at the top, so I was wondering what I was doing wrong. Thanks a lot!

Avatar
Euphemismus

Community Member, 82 Posts

10 June 2010 at 7:44pm

Hi,

you're welcome.
A new (pre) release of the module will be available soon with a lot of improvements.
I'll need testers then ;-)

Regards,
Marc

Avatar
Euphemismus

Community Member, 82 Posts

13 June 2010 at 12:26am

Hello everyone,

I've just had a few hours to work on the module and built a new trunk version for testing:
http://www.silverstripe.org/assets/modules/trunk/mod_guestbook-trunk-r79.tar.gz

I've added the frontend-editing and configurable entry form (ok, you can just show/hide some fields) and did a lot of refactoring.

So everyone interested in testing: You are welcome :-)

Regards,
Marc

Avatar
LC86

Community Member, 1 Post

18 June 2010 at 2:55am

Edited: 18/06/2010 2:57am

Hey Marc, I downloaded the new trunk version to test it out.

I chose to not show the last name and when we used it in dev mode we get this message:

(Notice) Undefined index: ShowLastNameInEntries

837 	 * @return string complete mail link with javascript
838 	 */
839 	public static function getEmailLink( $arrParam = array() )
840 	{
841 
842 		$strMailLink	= preg_replace( "/[;,]/", "", $arrParam[ 'Email' ] );
843 		$strMailLetters	= '';
844 		$strFirstname	= Convert::raw2xml( strip_tags( $arrParam[ 'FirstName' ] ) );
845 		$strLastName	= '';
846 		if( true == $arrParam[ 'ShowLastNameInEntries' ] )
847 		{
848 			$strLastName	= Convert::raw2xml( strip_tags( $arrParam[ 'LastName' ] ) );
849 		}
850 		$strUserName	= $strFirstname . ' ' . $strLastName;
851 		$arrResult		= array();
852 		$retVal			= $strUserName;