|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
Hello! I have a couple of questions:
First, is there a way to add one forum to everyone's watched forum list?
Second, is there a way to change these default settings for currently registered members:
By default should anything added to your Watch Lists be emailed to you?
Do you want to be notified via email when you receive a private message?
(I'd also like it to default to the yes setting for new registrants too, but that seems like a different question.)
Thanks for your support!
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
Since this stuff is stored into the database, yes, you can add this for every user with the right database querie.
As for getting it default to every user, you would need to add a little code in ubb in the new user stuff to add a watch for them.
Last edited by blaaskaak; 09/02/2007 4:41 PM.
|
|
|
|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
Do you know what the queries would be? I'll tinker with the code to set the defaults. Thanks.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
By default should anything added to your Watch Lists be emailed to you? UPDATE `ubbt_USER_PROFILE` SET `USER_EMAIL_WATCHLISTS` = '1'; By default should any Private Messages also be emailed to you? UPDATE `ubbt_USER_PROFILE` SET `USER_NOTIFY_ON_PM` = 'yes';
|
|
|
|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
Gizmo, you rock!
Do you know what the query would be to add a specific forum to all users watched list?
Thanks for your sharing your wisdom!
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
By default should anything added to your Watch Lists be emailed to you? UPDATE `ubbt_USER_PROFILE` SET `USER_NOTIFY_ON_PM` = 'yes'; that would be PM's ALTER TABLE `ubbt_USER_PROFILE` CHANGE `USER_EMAIL_WATCHLISTS` `USER_EMAIL_WATCHLISTS` TINYINT( 1 ) NOT NULL DEFAULT '1' Would set the watchlist e-mails default on for new users. ALTER TABLE `ubbt_USER_PROFILE` CHANGE `USER_NOTIFY_ON_PM` `USER_NOTIFY_ON_PM` CHAR( 3 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'yes' Would set the wachlist e-mail stuff default on for new users. As for adding users to the watchlist, it depends. Do you want to force it on again if they turn it off themselves?
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
A beginning: query 1: This would remove any of the forced watched forums. If you are gonna mass add users, be sure to clear any previous ones to prevent double entries. You could change query 2 to avoid adding double entries, but this works fine too. The number 150 must be replaced with the forum id of the forum you want to force the watch too. DELETE FROM ubbt_WATCH_LISTS WHERE WATCH_ID =150 AND WATCH_TYPE = 'f' query 2: Add all users to watch forum 150 (replace with your forum of choice). INSERT INTO ubbt_WATCH_LISTS( USER_ID, WATCH_ID, WATCH_NOTIFY_IMMEDIATE, WATCH_TYPE )
SELECT USER_ID, 150, 1, 'f'
FROM ubbt_USERS These queries would be great to run once in a while (together with the 2 from gizmo) if you want to keep forcing them. If not, you need to run the suggested queries in this topic once, and add a little code to the new user stuff that would insert the watch into the watchlist.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
i'd change that last query to 'REPLACE INTO ubbt_WATCH_LISTS...' then you replace, if already there, else it inserts small thing and good stuff blaask!! oh and you must have mysql 4.1 for subqueries (i sure hope we go that route soon! )
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
that would be PM's was in a hurry lol
|
|
|
|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
LOL!
This is great guys! Thanks a ton for all your support!
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
then you replace, if already there, else it inserts Ah, that way you can also skip delete query #1. But what if somebody changed the WATCH_NOTIFY_IMMEDIATE value to 0, wouldn't it add a new record? edit: REPLACE INTO will actually perfo...rm an update (as the name suggests).. Seeing this there would not be must advantage in using replace into.
Last edited by blaaskaak; 09/03/2007 6:54 AM. Reason: blaaskaak did some surfing reading up the replace into stuff
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
there's no KEY in that table to worry about but do it the way you feel comfortable
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
there's no KEY in that table to worry about It's not the key I'm worried about, it's double entries
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
It's not the key I'm worried about, it's double entries And double entries it is. Because it has no key, it has no way of knowing whether to add or to replace. On this table, the result with insert into and replace into gives the same result.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
okie dokie {insert padding to 15chars}
|
|
|
|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
Okay, I have another question about all this now. Several of my users are responding to the watched topics emails directly, and bypassing the forum...
Which language file or template would I modify to add a line to the emails that get automatically generated? I want to add something that says "please do not respond to this automated email account, instead please respond directly on the forum."
??? Thanks for all your support!
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
Just look at a string that is currently in the e-mail in the language editor. It's pretty easy to find the language strings used for just about everything in the forum.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
The best bet when dealing with language files, is to use the built in "search" on the editor page in the control panel; simply search for the "words" you want to change.
|
|
|
|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
Hmmmm... So, the email that gets generated says:
[user name] replied to a Watched Topic at the site: [link to post]
[displays actual user post]
And I want to add a string after that post..... How do I do that from the language editor page? I'm thinking I can't.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
hrm.. you got a good one there Peter. no, you can't do that without monkeying around with things.. now for 7.3 and the email overhaul dealio.. the answer is YES
|
|
|
|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
Hmmmm... Is there no way to insert a new wordlet or something into a template that allows me to do this?
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
well emails aren't template based, until 7.3. so the only way to do it would be to edit domailthread.inc.php and add your text to the email body. easy to do, if you are a coder.. but not built into the cpanel at all right now. tell me what you want to add and i can PM you what you need to do for me, it's perty easy to do.
|
|
|
|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
Sirdude, If I add this:
$mailbody .="$newline$newlinePlease do not respond to this email. Instead, visit the above link on the forums and join the conversation.";
To line 150 of domailthread.inc.php, that will work, yes? Thanks for telling me where to look! -Peter
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
oops.. i was confused as to which file.. you aren't doing the mail thread.. but the notify stuff.. lemme check that one. .... /me looks up code..
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
it would be addpost.inc.php.. add what you posted before $subject = "{$ubbt_lang['REPLY_SUB']} $Title : $Subject";
~line 790ish and just change $mailbody to $msg and you are good to go
|
|
|
|
Joined: Mar 2007
Posts: 20
stranger
|
stranger
Joined: Mar 2007
Posts: 20 |
Dude! You rock! Works beautifully.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
cool beans Peter.. glad it helped
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
1 members (Ruben),
1,248
guests, and
268
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|