Author Topic: [MOD] PM to owner of image when Comment ist posted  (Read 61892 times)

0 Members and 1 Guest are viewing this topic.

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: PM to owner of image when Comment ist posted
« Reply #15 on: October 26, 2005, 07:19:20 PM »
Also am besten wäre es bestimmt ein Feld zu dem Kontrollmenü hinzuzufügen...
Anleitungen gibt es dafür ja mehr als genug.
Traust Du es Dir zu das zu machen?

Wenn ja dann baue ich dir die Abfrage hier mit ein... (o:

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: PM to owner of image when Comment ist posted
« Reply #16 on: October 26, 2005, 07:24:11 PM »
Das Feld könnte ich in die member_editprofile.html einbauen, aber ich muss da ja auch bestimmt php Dateien bearbeiten und ggf. eine Tabelle i.d. Datenbank anlegen, oder?
Hast Du zufällig ein Link zu einer solchen Anleitung parat?

Danke im Voraus by Flo2005

Project offline

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: PM to owner of image when Comment ist posted
« Reply #17 on: October 26, 2005, 08:22:37 PM »
Weisst Du wie man ein Feld in der DB anlegt?

Wenn ja dann sollte das helfen...
http://www.4homepages.de/forum/index.php?topic=747.msg3277#msg3277

Aber nutze bitte ein Radio Button als auswahl... (o:

Und die Ausgabe in der Detail.html ist natürlich überflüssig...

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: PM to owner of image when Comment ist posted
« Reply #18 on: October 26, 2005, 08:31:02 PM »
Okay danke! Also so viel Ahnung habe ich leider nicht, aber ich werde es versuchen (danke für den Link)!

Da ich dafür bestimmt mehr Zeit benötige, werde ich den MOD vorerst ohne diese Funktion online stellen.

Danke nochmals by Flo2005

Project offline

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: PM to owner of image when Comment ist posted
« Reply #19 on: December 25, 2005, 10:44:37 PM »
thx works great

can I add check box to user panel ?

edit : I resolve it (like receive email when PM - new field in DB)
-------------------------------------------------------------------------------

but again i have problem

i receive PM but when i click on it
site works but over i see

Quote
DB Error: Bad SQL Query: SELECT COUNT(pm_id) AS total FROM 4images_pm WHERE pm_from = AND (pm_type = 2 OR pm_type = 0)
You have an error in your SQL syntax near 'AND (pm_type = 2 OR pm_type = 0)' at line 3

please help !
code is like it was :/ i change nothing

i dont know with one code fragment should i paste here

Offline dosensteck

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: PM to owner of image when Comment ist posted
« Reply #20 on: January 09, 2006, 03:57:27 PM »
verwende den mod nochimmer, jetzt komme ich einmal mit einem problem - und mit einer weiterführenden idee

problem: hat ein user im bildtitel ein ' geschrieben bekommt man beim kommentarposten einen sql fehler :/


edit: das ist der fehler:
Code: [Select]
DB Error: Bad SQL Query: INSERT INTO 4images_pm (pm_date, pm_to, pm_from, pm_subject, pm_type, pm_text, pm_bbcode, pm_html, pm_ip, pm_smiles) VALUES ('1136821809', 7, 2, '"Let's Zeitung zerfetz'" hat ein Kommentar erhalten', 5, 'Das folgende Bild hat ein Kommentar erhalten: [B]Bild:[/B] [url=http://www.hobby-fotografen.com/details.php?image_id=1578]Let's Zeitung zerfetz'[/url] [url=http://www.hobby-fotografen.com/details.php?image_id=1578][img]./data/thumbnails/16/1578.jpg[/img][/url] [B]Überschrift:[/B] [B]Kommentar:[/B] nur wegen dem fernsehprogramm :D netter kleiner, also können wir davon ausgehen das da jetzt öfter fotos von ihm auftauchen? *g* lg -- Mit freundlichen Grüßen, euer hobby-fotografen.com Team', 1, 0, 'd5e52692', 1)
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's Zeitung zerfetz'" hat ein Kommentar erhalten', 5, 'Das folgen

idee: wäre es möglich diese funktion auf alle user auszuweiten? ich stelle mir das so vor - der user kann einen button klicken, somit wird die user_id des users in ein extrafeld in der images tabelle geschrieben. wird nun ein neues kommentar geschrieben werden die user_ids der user ausgelsen die sich eingetragen haben und diese bekommen dann auch eine pm.

ich traue es mir leider nochnicht wirklich zu das selbst zu schreiben. habe zwar ein paar modifikationen an meiner page selbst gemacht (einfaches creditsystem - rahmen per css die der user selbst definieren kann), das geht für mich dann aber doch zuweit :/ (würde aber helfen wo es nur geht :D)

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: PM to owner of image when Comment ist posted
« Reply #21 on: January 22, 2006, 09:19:59 PM »
Hi,

also ne an/aus Funktion wäre echt nicht schlecht. Suche das auch noch für den Mail Mod bei neuen Kommentaren. Lies sich irgendwie nicht einbauen. Vielleicht hat das ja schon jemand in Angriff genommen ;)
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: PM to owner of image when Comment ist posted
« Reply #22 on: January 22, 2006, 09:21:37 PM »
doesn't exist any way to make it work for old PMS ?

 :wink:

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: PM to owner of image when Comment ist posted
« Reply #23 on: February 03, 2006, 09:15:46 PM »
If some one could help me I would ge gratefull

mod works but I discover my "pm" or "not pm" radio button wont work withot little addons in code :?
I mean data is put in DB but I dont know how tu put working "if" to code
field name is comments_to_pm (1/0) and its in users table

I need something like

Code: [Select]
$site_db->query($sql);
     $commentid = $site_db->get_insert_id();
     update_comment_count($id, $user_info['user_id']);

below
Code: [Select]
if comments_to_pm=1 {

here whole code from first page
}

« Last Edit: March 30, 2006, 05:54:27 PM by Zyga »

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: PM to owner of image when Comment ist posted
« Reply #24 on: February 08, 2006, 01:54:14 PM »
great MOD - thanks !  :)

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: PM to owner of image when Comment ist posted
« Reply #25 on: March 30, 2006, 05:51:20 PM »
one more idea
when someone post comment...
in PM we receive info who send this PM
Code: [Select]
$pm_from = 1; where 1 is user id
in most cases user_id 1 is gallery admin

what should i change to show in PM....
pm from "system" (or something simmiliar like "comment") without reply button and link to user profile

PS. maybe someone could help with code problem from 2 post ago

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: PM to owner of image when Comment ist posted
« Reply #26 on: March 30, 2006, 06:20:17 PM »
do it like this:
Code: [Select]
if ($user_info['comments_to_pm']) {
   here whole code from first page
}

for your notify problem.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: PM to owner of image when Comment ist posted
« Reply #27 on: April 01, 2006, 02:28:28 AM »
doesn't exist any way to make it work for old PMS ?

 :wink:

anyone ???  8O

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: PM to owner of image when Comment ist posted
« Reply #28 on: April 06, 2006, 06:41:19 PM »
do it like this:
Code: [Select]
if ($user_info['comments_to_pm']) {
   here whole code from first page
}

for your notify problem.

hmmmmmm in this case it take from DB info about comments_to_pm field from comment's autor not image owner 

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: PM to owner of image when Comment ist posted
« Reply #29 on: April 06, 2006, 07:42:34 PM »
oh, you are right.

you should use:
if ($image_row['user_id']) {
   here whole code from first page
}

$image_row['user_id'] is the image owner's user_id
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump