1
Phatbloke
Forced Notifications (news example shown)
  • 2006/3/20 14:49

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Hi

Ok I have been doing this for a while now and noticed a few others have been asking about it.

What this will do is show you how to change a users notification options without having to log in as them etc. I use it to force every user on my site to get an email everytime new news is posted.

This isn't a great solution but just a work around really. I was thinking of making a module to control all the notifications but quite frankly couldn't be bothered as I only have a small site and its not a huge deal for me to do the process below. Here is the process i follow. If anyone has a simplier way please let me know or if anyone is thinking of developing a module or hack for this I'm happy to help I just don't have the time to do this all myself.

Every time a new user registers I get a notification. I then go into phpMyAdmin to edit the database directly. Your host may use alternative methods.
First you need to find 2 pieces of info. the id of the person just registered and the module number for your news module.

So first view the data in the xoops_users table and make a note of the last uid created or the uid of the desired user.

Then open xoops_modules and find the mid of the news module.

Then finally in the table xoops_xoopsnotifications add a new line using the supplied form in phpmyadmin or writing a sql statment if you know how with this data:
not_id = *leave blank as it automatically increments*
not_modid = *news module id (mine is 5)*
not_itemid = 0
not_category = global
not_event = new_story
not_uid = *the user id of the desired user*
not_mode = 0

**Note**
This is only the notification to email a user everytime any news item is posted. If you wish to use other events or modules add a notification for yourself then view this table. It will be the last notification added and change the values for not_event and not_category as shown.

Good luck, this method works 100% for me and i have never had a problem but as usual I take no responsibility if you stuff it up and destroy you DB some how. Make sure its all backed up.



2
Phatbloke
Re: how to force email notification of new news postings
  • 2006/3/20 14:43

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Hi

Ok I have been doing this for a while now and it is getting annoying. I was thinking of making a module to control all the notifications but quite frankly couldn't be bothered as I only have a small site and its not a huge deal for me to do the process below. Here is the process i follow. If anyone has a simplier way please let me know or if anyone is thinking of developing a module or hack for this I'm happy to help I just don't have the time to do this all myself.

Every time a new user registers I get a notification. I then go into phpMyAdmin to edit the database directly. Your host may use alternative methods.
First you need to find 2 pieces of info. the id of the person just registered and the module number for your news module.

So first view the data in the xoops_users table and make a note of the last uid created or the uid of the desired user.

Then open xoops_modules and find the mid of the news module.

Then finally in the table xoops_xoopsnotifications add a new line using the supplied form in phpmyadmin or writing a sql statment if you know how with this data:
not_id = *leave blank as it automatically increments*
not_modid = *news module id (mine is 5)*
not_itemid = 0
not_category = global
not_event = new_story
not_uid = *the user id of the desired user*
not_mode = 0

**Note**
This is only the notification to email a user everytime any news item is posted. If you wish to use other events or modules add a notification for yourself then view this table. It will be the last notification added and change the values for not_event and not_category as shown.

Good luck, this method works 100% for me and i have never had a problem but as usual I take no responsibility if you stuff it up and destroy you DB some how. Make sure its all backed up.



3
Phatbloke
Re: System does NOT mail new user reg notifications
  • 2006/1/24 18:10

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


I have this activated and still no go.

I recieve emails if user activation is enabled but do not if automatic activation is enabled.



4
Phatbloke
Re: Coppermine Photo Gallery Version 1.4.2 Stable
  • 2006/1/17 21:20

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Ok a quick start for the theme providing you know basic html.
Basically how i did it and refined it from this.

Open your main page or a page that is rather empty and go view source. Copy all this data to a text file. Now edit all the paths for images so they resolve. ie in your situation something like title.gif would be themes/themename/images/title.gif but since the dirs are dif you need ../themes/themename/images/title.gif

Now once you think thats sussed get rid of everything from your main table so you get a blank table left. In that blank table put in something like the following. I just copied this out of the default template.

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td> </td> <td width="100%" align="center">
<br /> <br />
{SYS_MENU}
<br />
{SUB_MENU}
</td> </tr> </table>
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="top"> {LANGUAGE_SELECT_FLAGS}
</td></tr>
<tr> <td align="center" valign="top">
{THEME_SELECT_LIST} {LANGUAGE_SELECT_LIST}
</td> </tr> </table>
<img src="images/spacer.gif" width="1" height="15" alt="" /> <br />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td align="left" valign="top"> {ADMIN_MENU} {GALLERY} </td> </tr> </table>
</td> </tr> </table>

Then save it as template.html and make a new folder in coppermine themes dir with your theme name. Change the theme in coppermine config to use the one just made. Give it a go, this is very crude and a bit of tweaking will be required unfortunatly. Eventually you will get it sussed provided you know a little html and use of tables.

I'm thinking a default theme could be made that automatically uses XOOPS one although would take a bit of coding. Might have a wee look see how hard otherwise let me know how you go. I you get stuck flick me what you have.

As for the cpmfetch im not sure if it needs to be in the coppermine dir. Try putting it in where i have it /cpg142/plugins/cpmfetch see if it helps



5
Phatbloke
Re: Coppermine Photo Gallery Version 1.4.2 Stable
  • 2006/1/17 15:30

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Hi

I think off hand it can be anywhere as long as the domain is the same. For example you cant have it ashttp://photogallery.mysite.com andhttp://xoops.mysite.com buthttp://mysite.com/photogallery/ andhttp://mysite.com/xoops/ are fine.
So using relaitve paths will make it work fine. Good luck with the themes if you need more help let me know. I have had some luck making the menus 'semi' dynamic but its still not 100%



6
Phatbloke
Re: Coppermine Photo Gallery Version 1.4.2 Stable
  • 2006/1/16 22:18

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


galdernet

Here is what i have for my custom block on my home page. I created a custom block called photo gallery. It displays last uploads and random images with the album name and caption underneath.
Make sure the content type is php script and change the locations of files to suit where you have cpmfetch and your gallery
include('photogallery/plugins/cpmfetch/cpmfetch.php');
$objCpm = new cpm('/photogallery/');
?>
<table cellpadding="0" cellspacing="0" width="98%">
<tr>
<td class="itemHead">
<span class="itemTitle"><div align="center">Random Pictures</div></span>
</td>
</tr>
<tr>
<td>
<? 
$styleguide 
= array(
        
"subtitle" => "<b>Album:</b>%a <br>%t",
        
"imagestyle" => "photoclip",
                 
"cellstyle" => "photos",
        
"imagesize" => 'thumb');
$objCpm->cpm_viewRandomMedia (2,4,$styleguide); ?>
</td>
</tr>
<tr>
<td class="itemHead">
<span class="itemTitle"><div align="center">Last Upoads</div></span>
</td>
</tr>
<tr>
<td>
<? 
$styleguide 
= array(
        
"subtitle" => "<b>Album:</b>%a <br>%t",
        
"imagestyle" => "photoclip",
                
"cellstyle" => "photos",
        
"imagesize" => 'thumb');
$objCpm->cpm_viewLastAddedMedia (2,4,$styleguide);
$objCpm->cpm_close(); ?>
</td>
</tr>
</table>



7
Phatbloke
Re: Coppermine Photo Gallery Version 1.4.2 Stable
  • 2006/1/16 17:22

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Im not sure how much you know XOOPS and templates but i will try and explain the easiest way.
In the admin menu goto templates
You will need to be using a template other than the default. Easiest way is to clone the default. Then goto system and edit the template system_block_mainmenu.html

Add in the red

href="<{$xoops_url}>/"><{$block.lang_home}></a>
<a class="menuMain" href="<{$xoops_url}>/photogallery/">Photo Gallery</a>
<!-- start module menu loop -->

Now in the preferences / system / general settings make sure the template you cloned is being used.

All done hopefully



8
Phatbloke
Re: System does NOT mail new user reg notifications
  • 2005/12/15 11:11

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Unfortunatly I have still not solved this problem. I have even changed servers and reinstalled from scratch and it still doesnt work. I have tried all the different mail settings and emails are sent when mailing users and for notifications but not when a new user is registered.

Does anyone have any ideas?



9
Phatbloke
Re: Coppermine Photo Gallery Version 1.4.2 Stable
  • 2005/12/13 7:54

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Hi
Its good to hear you got it going. You can put a block on the main page or any other page using cpmfetch, its an easy plugin with good documentation. I managed to get my main menu ok although if i change XOOPS menu i have to change my coppermine theme, i just took a snapshot of the HTML by going view source in my browser and used that with some small tweaks as my theme. I also managed to get my admin menu displaying with a few tweaks and permissions as well. It is possible to get the whole thing running as though its kinda integrated but its too much work for me and I'm happy with the way mine works at the moment.
My site is http://jason.designbase.co.nz



10
Phatbloke
Re: Coppermine Photo Gallery Version 1.4.2 Stable
  • 2005/12/12 18:15

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Hi
I'm not 100% sure what that means as it has been a long time since i installed it. The bridging is definitley included in version 1.4.2. The idea is you get the whole thing working as a standalone individually of XOOPS then you enable the bridge so that logins are integrated between the two. Not sure how you can bypass this error if it keeps coming up. Have a look on the coppermine forums.




TopTop
(1) 2 3 »



Login

Who's Online

185 user(s) are online (121 user(s) are browsing Support Forums)


Members: 0


Guests: 185


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits