Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jan 2009
Posts: 92
whk
Offline
Journeyman
Journeyman
Joined: Jan 2009
Posts: 92
Our board has forums we've established for people who live in geographic areas around the country. I have also created groups so that when a new user is signed up, that user is added to a group manually when the account is approved. This allows me to easily send emails to particular groups.

I'd like to create a series of scripts so that each person in a selected geographical area group has the watch list for the forum that matches that group enabled so they automatically receive notification of posts in their geographical area. The following table shows the mapping of geographic areas for the groups, and what number corresponds to the regional forums established listed as the "Forum Keyword #" from the admin panel.

Group # - Group Name - Forum Keyword #
10 - SNE District - 20
11 - NNE District - 19
12 - LIS District - 29
13 - Gulf Coast District - 23
14 - Chesapeake District - 3
15 - Southeast District - 22
16 - California District - 24
17 - Carolinas District - 21
18 - Eastern Great Lakes District - 27
19 - Western Great Lakes District - 26
20 - PNW District - 25
21 - Other & International - 28

Can somebody help me with a series of SQL scripts I can execute to set the correct users to the geographic groups for watch lists? Assume that "F" is the number for the forum keyword assigned to a geographic area, and "G" is the geographical area group assigned an individual.

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
sure, that is definitely doable and you can do it with stock code by hijaacking a custom island (that will never display).

you can set that custom island to run the query(s) on an interval of your choosing (say every 60 mins for example), update with sql like "REPLACE INTO bla bla bla" from a nice ordered table, much like you have above..

you can even edit that table as time goes by and you add more groups and forum related.

smile

Joined: Jan 2009
Posts: 92
whk
Offline
Journeyman
Journeyman
Joined: Jan 2009
Posts: 92
That's a cool idea with the custom island for the updates! I assume I would check the "always build" option, and set the cache time to 1440 so it would rebuild once per day. I'm not a coding guru, so don't know the syntax to do the code. I do see the following in the custom island settings

/* PHP CODE HERE */

/* BODY HERE */
$body = <<<EOF
EOF;

Can you give me a hint on the syntax to do one that I would insert, and I can expand it for the others?

Thanks,
Bill

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yes, 'always build' puts it in the list of guys to be rebuilt, even if they are 'not used' in the portal.

then the cache prevents it from being rebuilt constantly.

hidden custom islands is like mini ubb.cron (™ SD laugh )

i use these all over the place for housekeeping routines wink

i'll look @ the queries later on today, when i have time.

i have 2 items on my plate that need being done before that

Joined: Jan 2009
Posts: 92
whk
Offline
Journeyman
Journeyman
Joined: Jan 2009
Posts: 92
No rush since this isn't a real time critical item. I appreciate any help you can give when you have time available. Thanks!

Joined: Jan 2009
Posts: 92
whk
Offline
Journeyman
Journeyman
Joined: Jan 2009
Posts: 92
Bump - just a reminder for Sirdude when you get a chance. Thanks!


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Ruben), 476 guests, and 111 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)