Previous Thread
Next Thread
Print Thread
Hop To
couple of questions...
#196057 09/02/2007 2:47 PM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
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!

Re: couple of questions...
Peter_EC #196059 09/02/2007 4:40 PM
Joined: Aug 2006
Posts: 1,356
veteran
Offline
veteran
Joined: Aug 2006
Posts: 1,356
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.

[Linked Image from siemons.org]
Re: couple of questions...
Yarp #196063 09/02/2007 5:03 PM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
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.


Re: couple of questions...
Peter_EC #196068 09/02/2007 7:32 PM
Joined: Jun 2006
Posts: 15,940
Likes: 29
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,940
Likes: 29
By default should anything added to your Watch Lists be emailed to you?
Code
UPDATE `ubbt_USER_PROFILE` SET `USER_EMAIL_WATCHLISTS` = '1';

By default should any Private Messages also be emailed to you?
Code
UPDATE `ubbt_USER_PROFILE` SET `USER_NOTIFY_ON_PM` = 'yes';


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, I Find Rocks, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: couple of questions...
Gizmo #196091 09/03/2007 12:57 AM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
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!

Re: couple of questions...
Gizmo #196093 09/03/2007 1:11 AM
Joined: Aug 2006
Posts: 1,356
veteran
Offline
veteran
Joined: Aug 2006
Posts: 1,356
Originally Posted by Gizmo
By default should anything added to your Watch Lists be emailed to you?
Code
UPDATE `ubbt_USER_PROFILE` SET `USER_NOTIFY_ON_PM` = 'yes';


that would be PM's smile

Code
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.

Code
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?


[Linked Image from siemons.org]
Re: couple of questions...
Yarp #196094 09/03/2007 1:30 AM
Joined: Aug 2006
Posts: 1,356
veteran
Offline
veteran
Joined: Aug 2006
Posts: 1,356
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.

Code
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).

Code
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.


[Linked Image from siemons.org]
Re: couple of questions...
Yarp #196096 09/03/2007 1:49 AM
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
i'd change that last query to 'REPLACE INTO ubbt_WATCH_LISTS...'

then you replace, if already there, else it inserts

small thing wink and good stuff blaask!!

oh and you must have mysql 4.1 for subqueries (i sure hope we go that route soon! wink )

Re: couple of questions...
Yarp #196097 09/03/2007 1:50 AM
Joined: Jun 2006
Posts: 15,940
Likes: 29
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,940
Likes: 29
Originally Posted by blaaskaak
that would be PM's smile
was in a hurry lol


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, I Find Rocks, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: couple of questions...
Gizmo #196098 09/03/2007 2:47 AM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
stranger
Joined: Mar 2007
Posts: 20
LOL!

This is great guys! Thanks a ton for all your support!

Re: couple of questions...
SD #196099 09/03/2007 2:54 AM
Joined: Aug 2006
Posts: 1,356
veteran
Offline
veteran
Joined: Aug 2006
Posts: 1,356
Originally Posted by Sirdude
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

[Linked Image from siemons.org]
Re: couple of questions...
Yarp #196122 09/03/2007 4:30 PM
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
there's no KEY in that table to worry about wink

but do it the way you feel comfortable

Re: couple of questions...
SD #196124 09/03/2007 4:43 PM
Joined: Aug 2006
Posts: 1,356
veteran
Offline
veteran
Joined: Aug 2006
Posts: 1,356
Originally Posted by Sirdude
there's no KEY in that table to worry about wink


It's not the key I'm worried about, it's double entries smile


[Linked Image from siemons.org]
Re: couple of questions...
Yarp #196125 09/03/2007 4:56 PM
Joined: Aug 2006
Posts: 1,356
veteran
Offline
veteran
Joined: Aug 2006
Posts: 1,356
Originally Posted by blaaskaak
It's not the key I'm worried about, it's double entries smile


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.


[Linked Image from siemons.org]
Re: couple of questions...
Yarp #196131 09/03/2007 5:05 PM
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
okie dokie {insert padding to 15chars} laugh

Re: couple of questions...
Peter_EC #199949 10/25/2007 7:18 PM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
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!

Re: couple of questions...
Peter_EC #199950 10/25/2007 7:20 PM
Joined: Aug 2006
Posts: 1,356
veteran
Offline
veteran
Joined: Aug 2006
Posts: 1,356
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.


[Linked Image from siemons.org]
Re: couple of questions...
Peter_EC #199952 10/25/2007 7:25 PM
Joined: Jun 2006
Posts: 15,940
Likes: 29
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,940
Likes: 29
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.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, I Find Rocks, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: couple of questions...
Gizmo #199960 10/25/2007 8:03 PM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
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.

Re: couple of questions...
Peter_EC #199961 10/25/2007 8:29 PM
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
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 wink

Re: couple of questions...
SD #199962 10/25/2007 10:36 PM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
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?

Re: couple of questions...
Peter_EC #199963 10/25/2007 10:55 PM
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
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 smile for me, it's perty easy to do.

Re: couple of questions...
SD #199967 10/26/2007 12:12 AM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
stranger
Joined: Mar 2007
Posts: 20
Sirdude,

If I add this:
Code
$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

Re: couple of questions...
Peter_EC #199968 10/26/2007 12:25 AM
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
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.. smile

Re: couple of questions...
SD #199969 10/26/2007 12:33 AM
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
it would be addpost.inc.php.. add what you posted before

PHP Code
$subject = "{$ubbt_lang['REPLY_SUB']} $Title : $Subject"; 

~line 790ish

and just change $mailbody to $msg and you are good to go smile

Re: couple of questions...
SD #200006 10/26/2007 11:11 PM
Joined: Mar 2007
Posts: 20
stranger
OP Offline
stranger
Joined: Mar 2007
Posts: 20
Dude! You rock! Works beautifully.

Re: couple of questions...
Peter_EC #200011 10/27/2007 1:37 AM
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
cool beans Peter.. glad it helped smile


Link Copied to Clipboard
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Followed Threads
by FREAK - 07/13/2020 9:13 PM
Can't Delete or Add New Forum
by FREAK - 07/13/2020 8:25 PM
Non-Admin users can't see attached pictures
by jjjjj - 07/11/2020 8:09 PM
[NOTABUG] Report Post bug..
by Morgan - 07/05/2020 1:48 PM
Trial Subscription question.
by Ruben - 07/03/2020 2:34 PM
Who's Online Now
0 members (), 73 guests, and 44 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4