Author Topic: [developing] Notifications & User Activity v0.1  (Read 33249 times)

0 Members and 1 Guest are viewing this topic.

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [developing] Notifications & User Activity v0.1
« Reply #15 on: November 13, 2011, 01:08:05 PM »
thank you very much for your help!
This unfortunately does not solve the problem on the notification.php  :cry:
Best regards
Loda

Offline asms

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: [developing] Notifications & User Activity v0.1
« Reply #16 on: November 20, 2011, 01:32:55 PM »
thx ... ^_^
i really like it
and yeah i put it in my site and its WOrk so good.. ^_^
just TO let YOu know..  :lol:

Offline auftrip

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [developing] Notifications & User Activity v0.1
« Reply #17 on: November 20, 2011, 08:14:18 PM »
what kind of data do i have to open for:
STEP 1

run this query in your php-my-admin:


I dont know where i have to input this:
CREATE TABLE IF NOT EXISTS `4images_notifications` (
  `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
  `from_id` int(10) unsigned NOT NULL DEFAULT '0',
  `to_id` int(10) unsigned NOT NULL DEFAULT '0',
  `from_username` varchar(255) NOT NULL,
  `to_username` varchar(255) NOT NULL,
  `what_pic` varchar(255) NOT NULL,
  `text1` varchar(255) NOT NULL,
  `text2` varchar(255) NOT NULL,
  `text3` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `content_link` varchar(255) NOT NULL,
  `date` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `from_id` (`from_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ;


could someone help me plz

Rembrandt

  • Guest
Re: [developing] Notifications & User Activity v0.1
« Reply #18 on: November 20, 2011, 09:56:09 PM »
what kind of data do i have to open for:
....

in your Database

Offline auftrip

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [developing] Notifications & User Activity v0.1
« Reply #19 on: November 21, 2011, 04:21:43 PM »
and how can i do this?
i made a new install.php and insert the things of step 1. after i opened install.php in root order but nothing happend.
i dont know what to do

Rembrandt

  • Guest
Re: [developing] Notifications & User Activity v0.1
« Reply #20 on: November 21, 2011, 05:34:46 PM »
copy the install_notifi.php from the attachment in your gallery/root and call it on.

mfg Andi

Offline auftrip

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [developing] Notifications & User Activity v0.1
« Reply #21 on: November 21, 2011, 07:18:25 PM »
danke rembrandt.
jetzt hab ich noch ein prob und zwar find ich
» <a href="{url_control_panel}">{lang_control_panel}</a><br /> nicht im header.html
mein header sieht so aus. wo müsste ich dann » Notifications <a href="notifications.php?action=new">{sess_user_notify}</a><br />
einfügen?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<
html dir="{direction}">
<
head>
<
title>{prepend_head_title}{site_name}</title>
<
meta http-equiv="content-type" content="text/html; charset={charset}">
<
meta name="description" content="{detail_meta_description}{site_name}">
<
meta name="keywords" content="{detail_meta_keywords}">
<
meta name="robots" content="index,follow">
<
meta name="revisit-after" content="10 days">
<
meta http-equiv="imagetoolbar" content="no">
<
link rel="stylesheet" href="{template_url}/style.css" type="text/css">
<
link rel="shortcut icon" href="../../../images/favicon.ico">
<
script language="javascript" type="text/javascript">
<!--

  var 
captcha_reload_count 0;
	
var 
captcha_image_url "{url_captcha_image}";
  function 
new_captcha_image() {
    if (
captcha_image_url.indexOf('?') == -1) {
	
	
  
document.getElementById('captcha_image').srccaptcha_image_url+'?c='+captcha_reload_count;
	
	
} else {
	
	
  
document.getElementById('captcha_image').srccaptcha_image_url+'&c='+captcha_reload_count;
	
	
}

    
document.getElementById('captcha_input').value="";
    
document.getElementById('captcha_input').focus();
    
captcha_reload_count++;
  }

// -->
</script>
{if 
has_rss}
<
link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}">
{endif 
has_rss}
</
head>
<
body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
<
script type="text/javascript">
SOI = (typeof(SOI) != 'undefined') ? SOI : {};(SOI.ac21fs SOI.ac21fs || []).push(function() {
(new 
SOI.DateTimeService("49502871433""DE")).setWithWeekday(false).start();});
(function() {if (
typeof(SOI.scrAc21) == "undefined") { SOI.scrAc21=document.createElement('script');SOI.scrAc21.type='text/javascript'SOI.scrAc21.async=true;SOI.scrAc21.src=((document.location.protocol == 'https:') ? 'https://' 'http://') + 'homepage-tools.schnelle-online.info/Homepage/atomicclock2_1.js';(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(SOI.scrAc21);}})();
</
script>
<
script type="text/javascript">
  var 
framefenster document.getElementsByTagName("iFrame");
  var 
auto_resize_timer window.setInterval("autoresize_frames()"400);
  function 
autoresize_frames() {
    for (var 
0framefenster.length; ++i) {
        if(
framefenster[i].contentWindow.document.body){
          var 
framefenster_size framefenster[i].contentWindow.document.body.offsetHeight;
          if(
document.all && !window.opera) {
            
framefenster_size framefenster[i].contentWindow.document.body.scrollHeight;
          }
          
framefenster[i].style.height framefenster_size 'px';
        }
    }
  }
</
script>

Rembrandt

  • Guest
Re: [developing] Notifications & User Activity v0.1
« Reply #22 on: November 21, 2011, 07:28:41 PM »
im prinzip ist es egal wo du sie rein schreibst, in die header würde ich pers. sie nicht rein schreiben.
du könntest die zeile z.b. in die user_logininfo.html schreiben.


in eigener sache:
<-- ein langer weg  :mrgreen:

Offline auftrip

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [developing] Notifications & User Activity v0.1
« Reply #23 on: November 21, 2011, 07:50:59 PM »
vielendank jetzt klapps super:)

Rembrandt

  • Guest
Re: [developing] Notifications & User Activity v0.1
« Reply #24 on: November 21, 2011, 07:56:21 PM »
np  :)

Offline auftrip

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [developing] Notifications & User Activity v0.1
« Reply #25 on: November 24, 2011, 03:43:04 PM »
is it possible to include this MOD http://www.4homepages.de/forum/index.php?topic=29164.0?
 
i mean:
if person 1 loads up an image.
and person 2 writes a comment and press on the like button.
then person 3 writes a comment under the picture of person 1.
--> so only person 1 gets an notification. it would be great, that person 2 who liked the pictureand wrote a comment, gets a notification, too.

i hope you understand my bad english:)

Offline auftrip

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [developing] Notifications & User Activity v0.1
« Reply #26 on: December 06, 2011, 07:48:13 PM »
if somebody have this MOD http://www.4homepages.de/forum/index.php?topic=29164.0?
than he could inclde the like me button, too. so he get Notifications about the peolpe who liked your picture.

open details.php an serach:
    $sql "UPDATE ".IMAGES_TABLE."
            SET image_likeme = '"
.$likeme.(($likeme)?",":"").$user_info['user_name']."'
            WHERE image_id = 
$image_id";
    
$site_db->query($sql);


add after:
	
//activity 
	
	
  
$cat $image_row['cat_id']; 
	
	
  
$to_id $image_row['user_id']; 
          
$media $image_row['image_media_file'];
          
$name $image_row['image_name'];
	
	
  
$image_id $image_row['image_id'];
	
	
  
$user_name $user_info['user_name'];
	


	
	
$sql "UPDATE ".USERS_TABLE."
	
	
SET user_notify=user_notify+1 WHERE user_id = "
.$to_id;
	
	
$site_db->query($sql);
	
	
  

	
    
$sql "INSERT INTO " NOTIFY_TABLE "
        (id, from_id, to_id, from_username, to_username, what_pic, text1, text2, text3, content, content_link, date)
        VALUES(NULL, '"
.$user_info['user_id']."', '$to_id', '$user_name', '0', '".$cat."' '/' '".$media."' , 'likes', '".$name."', '' ' ' '<b>' '$rating_value' '</b>' , '', 'details.php?image_id=' '".$image_id."', '" time() . "')";
	

	
    
$site_db->query($sql);
	
  
//activity



Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [developing] Notifications & User Activity v0.1
« Reply #27 on: December 19, 2011, 08:28:34 AM »
I would like to offer to do the following:

When user haven`t notifications hide counter...

But when user have new notification show count with RED NUMBER i.e.

Anyone may help me with this?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [developing] Notifications & User Activity v0.1
« Reply #28 on: December 19, 2011, 12:46:21 PM »
Did you try use something like this?
Code: [Select]
{if sess_user_notify}» Notifications <a href="notifications.php?action=new">{sess_user_notify}</a><br />{endif sess_user_notify}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline auftrip

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [developing] Notifications & User Activity v0.1
« Reply #29 on: December 19, 2011, 03:13:28 PM »
thanks works great:)