Loading...
 
Skip to main content

History: ContactUs Doc (obsolete)

Preview of version: 10

  • Turn on the UserMessages feature to allow the users to contact you via the built in message system when using the Contact Us page.



Contact Us (anonymous)
remember to enabled the Contact Us and user Messaging features, set a contact name on Admin->General and let anonymous use the messaging system permission

Another (better) method


Annonymous Contact Feature (Tikiwiki 1.8.2)

If you want anonymous users to be able to contact site admin, but NOT contact users from forums etc. as the above would allow them to do, a couple of changes need to be made to some files to make the anonymous contact feature work (Yes it exists, it just is hidden from view and needs some light PHP modding).

Point 1, in 1.8.2 the tiki_preferences table in the usual database stuff does include a preference called "contact_anon" and, by default, its value is set to 'n', First step is to change this to 'y'. You can hop into the database with your favourite admin tool, PHPMyAdmin in my case and just edit the entry, OR we can modify the admin > General page to include a little tick-box for it underneath the "Contact User" text box.

To do this we have to edit the PHP and the template AND the PHP files entitled:
tiki-admin_include_general.tpl
and
tiki-admin_include_general.php

but, because I'm such a nice fellow, I'm going to attach modified versions of the files to this page (great arent I?) The .tpl file, belongs in the tiki/templates folder, and the PHP file belongs in the tiki/ folder.

Next we have to make a change to the PHP file for the contact us feature, because, although it tests to see if abnonymous is allowed to see it, it doesn't actually do anything with the messages anonymous messages once they are submitted.
Again I'll just plug in an attachment with the corrected file, all I did was copy the code from the execution block for the registere users and paste it in for the anonymous users. We could go about modifying everything so we don't have duplicate code and we have a slightly more complex decision structure, but who can be bothered for such a small file anyways?

So with the files modded (Or copied into place) You chould - finally - be able to go into admin > general, enter the contact user (admin is the best bet really), tick the anonymous contact tickbox underneath it, "change preferences" and hooray!

Anonymous Contact fully functional!! And Anonymous can't message other users!!

If you want to know exactly what I edited in the files attached, see the readme file ๐Ÿ˜‰

Chances are now, that someone will point out that this has aalready been fixed (in blah blah blah release) Oh well, it was fun.

RW

โžก๏ธ Yup see ReleaseProcess181 ๐Ÿ˜‚

AHA!! But this way the anonymous users can't message anyone other than the $contactUser So there's less chance of them wandering around the forums and starting sending irritating messages to the site users ๐Ÿ˜›. They have to log in to do that... Like I do.

UPDATED FOR TikiWiki 1.8.2


Okay, I made some slight changes, tidied it up a bit, made anonymous users be forced into supplying an e-mail address and moved the "send" button to the bottom of the form. Contact Us for users still works as before, contact us (anonymous) works the same, but the message is marked as "from: email at of-anonymous.user.net" instead of "from: anonymous".

I'm also looking into making the message viewer pick out anonymous contact messages and force the reply feature to g to the web-mail function (if enabled) instead of trying to reply to an invalid username (the e-mail address). As it is, I expect most people just make tiki forward messages through e-mail anyways, in which case this should enable you to e-mail back from your mail client and be able to address the relevant anonymous contacter thanks to the inclusion of the sender in the e-mail template.

Does that make any sense??

Anyway, I'm replacing the old attachment with this better version (I'll keep the oldie for prosparity, get it through UserPageRussWilde if you really want it).

History

Advanced
Information Version
alain_desilets 24
View
alain_desilets 23
View
Jan Krohn 22
View
Jan Krohn 21
View
Martin 20
View
Martin 19
View
Martin 18
View
Martin 17
View
Martin 16
View
Martin 15
View
Russ Wilde 14
View
Russ Wilde 13
View
Russ Wilde 12
View
Russ Wilde 11
View
Russ Wilde 10
View
Russ Wilde 9
View
Damian Parker 8
View
Russ Wilde 7
View
Marc Laporte 6
View
Marc Laporte 5
View
pongle 4
View