News - Features - Downloads - Forum - Team - Support - Switch View: Screen
Login - Register - Send password

Answers: 17
Page [1]
Tress13


Highlander




Location: Lüdenscheid
Posts: 3048
# Thread - 2015-01-10 at 7:40 PM
Ich hatte mir die lang-Dateien des notifymods wie folgt geändert:
 
1.
1. / 2. / ... 
 $cs_lang['joinus_text'] = 'Es ist eine neue Joinus-Bewerbung vorhanden. \n \n';


Allerdings werden mir die beiden \n's auch genau so in meine eMail ausgegeben.
Sie sollten doch eigentlich für 2 Leerzeilen sorgen. Aber genau das tun sie nicht.


Woran könnte das liegen?


------------------


www.iv-gaming.de | www.iv-artwork.de
Inactive
Tom08 ClanSphere Team

Supporter
Supporter



Location: Daheim
Posts: 2923
# Answer: 1 - 2015-01-11 at 6:01 PM
Du musst " (Anführungszeichen) statt ' nutzen. Bei ' werden die Zeilenumbrüche nicht berücksichtigt.

Grüße


------------------
Bei Problemen mit Code von mir bitte eine Private Nachricht an mich


Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 2 - 2015-01-11 at 6:57 PM
Aaaahhh... man lernt nie aus.



Vielen Dank!




Edit:

Nun kommen beim Joinus keine eMail-Texte an. Auch nicht mehr mit der originalen functions.php.
Die Mail ansich kommt, nur ohne den Text.

In den Logs steht folgendes:
 
1.
2.
3.
1. / 2. / ... 
  FehlerPHP Notice on line 50 -> Undefined indexjoinus_text
Datei Name
: .../mods/notifymods/functions.php
Verursacht in
:     mod=joinus&action=new


Das wäre die besagt Zeile aus der functions.php
 
1.
1. / 2. / ... 
        $text[$lang] = empty($var) ? $mail_text[$lang][$mod.'_text'] : vsprintf($mail_text[$lang][$mod.'_text'], $var);


Meine notifymods.php schaut so aus:
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
1. / 2. / ... 
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$ 

$cs_lang['mod_name']         = 'Benachrichtigungen';
$cs_lang['text']             = 'Das Benachrichtigungen Modul';
$cs_lang['head_create']      = 'Hinzufügen';
$cs_lang['body']             = 'Bitte alle Felder mit * ausfüllen.';
$cs_lang['user']             = 'Benutzer';
$cs_lang['access']           = 'Rechte';
$cs_lang['no_user']          = '- Es muss ein Benutzer ausgewählt werden.';
$cs_lang['user_exists']      = '- Der ausgewählte Benutzer ist bereits eingetragen.';
$cs_lang['new']              = 'Neuer Benutzer';
$cs_lang['caption']          = 'Legende';
$cs_lang['joinus']           = 'Joinus';
$cs_lang['board']            = 'Forum';
$cs_lang['joinus_text']      = "Es ist eine neue Joinus-Bewerbung vorhanden. \n \n";
$cs_lang['joinus_subject']   = 'Neuer Joinus-Eintrag';
$cs_lang['board_text']       = '"%s" meldete ein Kommentar im Forenthema "%s", mit der Nachricht: "%s"';
$cs_lang['board_subject']    = 'Meldung eines Forum-Kommentars';
$cs_lang['board_info']       = 'Betrifft nur gemeldete Themen und Beiträge';


------------------


www.iv-gaming.de | www.iv-artwork.de

Last edit by Tress13 at 2015-01-12 at 3:38 PM (3x Edited)
Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 3 - 2015-01-12 at 7:32 PM
Jetzt kommt kein Inhalt mehr an.
Wüsste nicht, was passiert sein sollte.

Siehe oben.


------------------


www.iv-gaming.de | www.iv-artwork.de

Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 4 - 2015-01-14 at 5:10 AM
Ich kann den Fehler leider nicht finden.
Ich habe doch an der functions.php der notifymods nichts geändert.
Oder kann das an einer anderen Datei liegen?
Die lang-Dateien sind ja vorhanden. Sie werden mir nur nicht in der eMail ausgegeben.


------------------


www.iv-gaming.de | www.iv-artwork.de

Inactive
|
Jam2 ClanSphere Team


Highlander





Posts: 3291
# Answer: 5 - 2015-01-16 at 8:56 PM
Debug Meldungen?


------------------
Gruß/ Best regards
Jam2

Nützliche Forumbeiträge/Codepastes: (Useful comments in our board / codepastes)
Template Switch for index.php
Board Navlist last posts

Edi: könnte man denn auch hier eine erweiterung einfügen?
Jam2: das web ist wie toyota.....
Edi: hö ?
Jam2: nichts ist unmöglich!


Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 6 - 2015-01-17 at 1:39 PM
Keine Debug-Meldungen vorhanden.

Die Nachrichten kommen nun auch wieder mit Inhalt an (warum auch immer),
aber trotz der beiden Gänsefüsschen werden die \n \n in der Mail gezeigt.


------------------


www.iv-gaming.de | www.iv-artwork.de

Last edit by Tress13 at 2015-01-17 at 1:40 PM (1x Edited)
Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 7 - 2015-01-25 at 12:16 PM
Problem hat immer noch bestand.

Hat keiner eine Idee, warum die \n \n's nicht als Zeilenumbruch genommen werden,
obwohl ich Gänsefüsschen (") anstelle der Apostroph (') benutze?
Oder wenigstens mal einen Tipp wo ich gucken müsste?

Der Quellcode findet sich weiter oben in diesem Thread.


------------------


www.iv-gaming.de | www.iv-artwork.de

Inactive
|
sgraewe ClanSphere Team

Supporter
Supporter




Posts: 6116
# Answer: 8 - 2015-01-25 at 12:23 PM
Was genau hast du denn geändert? nur die lang datei?


Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 9 - 2015-01-25 at 1:30 PM
Tja was genau hab ich nicht geändert könnte man eher fragen.
Ich specke mir ClanSphere gerade auf ein minimum der von mir benötigten Funktionen ab.
Welche Dateien kommen für diese Funktion alles in Frage, dann poste ich die mal alle hier.



------------------


www.iv-gaming.de | www.iv-artwork.de

Inactive
|
sgraewe ClanSphere Team

Supporter
Supporter




Posts: 6116
# Answer: 10 - 2015-01-25 at 1:36 PM
uff kp was die Mailfunktion alles braucht :x
hab mich damit noch nie wirklich auseinander gesetzt.

empfehle für solche Änderungen btw Github, dann hat man ne Übersicht darüber was man alles geändert hat.


Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 11 - 2015-01-25 at 2:04 PM
Das wäre meine geänderte joinus_new.php.
Vlt liegt der Hase ja da irgendwo begraben:

mehr... +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
1. / 2. / ... 
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$

$cs_lang cs_translate('joinus');

include_once(
'lang/' $account['users_lang'] . '/countries.php');

$data = array();
$data['op'] = cs_sql_option(__FILE__,'joinus');
$data['head']['getmsg'] = cs_getmsg();
$data['if']['form'] = empty($data['head']['getmsg']) ? TRUE FALSE;

$captcha 0;
if(empty(
$account['users_id']) AND extension_loaded('gd')) {
  
$captcha 1;
}

foreach(
$data['op'] AS $key => $value) {
  if(!empty(
$value)) {
    
$data['if'][$key] = true;
  }
  else {
    
$data['if'][$key] = false;
  }
}

$data['if']['pass'] = 0;
$data['if']['nopass'] = 1;
$data['if']['captcha'] = 0;

if(isset(
$_POST['submit'])) {

  
$data['join']['squads_id'] = $_POST['squads_id'];
  
$data['join']['joinus_nick'] = $_POST['joinus_nick'];
  
$data['join']['joinus_name'] = $_POST['joinus_name'];
  
$data['join']['joinus_surname'] = $_POST['joinus_surname'];
  
$data['join']['joinus_age'] = cs_datepost('age','date');
  
$data['join']['joinus_country'] = $_POST['joinus_country'];
  
$data['join']['joinus_place'] = $_POST['joinus_place'];
  
$data['join']['joinus_email'] = $_POST['joinus_email'];
  
$data['join']['joinus_more'] = $_POST['joinus_more'];
  
$data2['join']['joinus_rules'] = empty($_POST['joinus_rules']) ? 1;

  if(empty(
$account['users_id'])) {
    
$data['join']['users_pwd'] = $_POST['users_pwd'];
  } else {
    
$data['if']['pass'] = 1;
    
$data['if']['nopass'] = 0;
  }

  
$error 0;
  
$errormsg '';

  
$nick2 str_replace(' ','',$data['join']['joinus_nick']);
  
$nickchars strlen($nick2);

  
$op_users cs_sql_option(__FILE__,'users');

  if(
$nickchars $op_users['min_letters']) {
    
$error++;
    
$errormsg .= sprintf($cs_lang['short_nick'], $op_users['min_letters']) . cs_html_br(1);
  }
  if(empty(
$account['users_id'])) {
    
$pwd2 str_replace(' ','',$data['join']['users_pwd']);
    
$pwdchars strlen($pwd2);
    if(
$pwdchars<4) {
      
$error++;
      
$errormsg .= $cs_lang['short_pwd'] . cs_html_br(1);
    }
  }
  if(!empty(
$data['if']['vorname'])) {
    if(empty(
$data['join']['joinus_name'])) {
      
$error++;
      
$errormsg .= $cs_lang['no_name'] . cs_html_br(1);
    }
  }
  if(!empty(
$data['if']['surname'])) {
    if(empty(
$data['join']['joinus_surname'])) {
      
$error++;
      
$errormsg .= $cs_lang['no_surname'] . cs_html_br(1);
    }
  }
  if(!empty(
$data['if']['place'])) {
    if(empty(
$data['join']['joinus_place'])) {
      
$error++;
      
$errormsg .= $cs_lang['no_place'] . cs_html_br(1);
    }
  }
  if(!empty(
$data['if']['country'])) {
    if(empty(
$data['join']['joinus_country'])) {
      
$error++;
      
$errormsg .= $cs_lang['no_country'] . cs_html_br(1);
    }
  }
  if(!empty(
$data['if']['squad'])) {
    if(empty(
$data['join']['squads_id'])) {
      
$error++;
      
$errormsg .= $cs_lang['no_squad'] . cs_html_br(1);
    }
  }
  if(!empty(
$data['if']['more'])) {
    if(empty(
$data['join']['joinus_more'])) {
      
$error++;
      
$errormsg .= $cs_lang['no_info'] . cs_html_br(1);
    }
  }
  if(empty(
$data['join']['joinus_age'])) {
    
$error++;
    
$errormsg .= $cs_lang['no_age'] . cs_html_br(1);
  }
  if(empty(
$data2['join']['joinus_rules'])) {
    
$error++;
    
$errormsg .= $cs_lang['no_rules'] . cs_html_br(1);
  }

  
$pattern "=^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$=i";
  if(!
preg_match($pattern,$data['join']['joinus_email'])) {
    
$error++;
    
$errormsg .= $cs_lang['email_false'] . cs_html_br(1);
  }

  include_once 
'mods/contact/trashmail.php';
  if(
cs_trashmail($data['join']['joinus_email'])) {
    
$error++;
    
$errormsg .= $cs_lang['email_false'] . cs_html_br(1);
  }

  
$flood cs_sql_select(__FILE__,'joinus','joinus_since',0,'joinus_since DESC');
  
$maxtime $flood['joinus_since'] + $cs_main['def_flood'];
  if(
$maxtime cs_time()) {
    
$error++;
    
$diff $maxtime cs_time();
    
$errormsg .= sprintf($cs_lang['flood_on'], $diff);
  }
  if(empty(
$account['users_id'])) {
    if (!
cs_captchacheck($_POST['captcha'])) {
      
$error++;
      
$errormsg .= $cs_lang['captcha_false'] . cs_html_br(1);
    }
  }

  
$and ' AND users_id != ' $account['users_id'];
  
$search_email cs_sql_count(__FILE__,'users',"users_email = '" cs_sql_escape($data['join']['joinus_email']) . "'" $and);
  if(!empty(
$search_email)) {
    
$error++;
    
$errormsg .= $cs_lang['email_exists'] . cs_html_br(1);
  }

  
$search_nick cs_sql_count(__FILE__,'users',"users_nick = '" cs_sql_escape($data['join']['joinus_nick']) . "'" $and);
  if(!empty(
$search_nick)) {
    
$error++;
    
$errormsg .= $cs_lang['nick_exists'] . cs_html_br(1);
  }

  if ((int) 
$_POST['age_year'].$_POST['age_month'].$_POST['age_day'] > (int) cs_datereal('Ymd')) {
    
$error++;
    
$errormsg .= $cs_lang['age_false'] . cs_html_br(1);
  }
}
else {
  
$data['join']['squads_id'] = '';
  
$data['join']['joinus_nick'] = '';
  
$data['join']['joinus_name'] = '';
  
$data['join']['joinus_surname'] = '';
  
$data['join']['joinus_age'] = 0;
  
$data['join']['joinus_country'] = 'fam';
  
$data['join']['joinus_place'] = '';
  
$data['join']['joinus_email'] = '';
  
$data['join']['joinus_more'] = '';
  
$data['join']['users_pwd'] = '';
  
$data2['join']['joinus_rules'] = 0;

  if(!empty(
$account['users_id'])) {
    
$fetch 'users_nick, users_name, users_surname, users_age, users_country, users_place, users_email';
    
$cs_user cs_sql_select(__FILE__,'users',$fetch,"users_id = '" $account['users_id'] . "'");
    
$data['join']['joinus_nick'] = $cs_user['users_nick'];
    
$data['join']['joinus_name'] = $cs_user['users_name'];
    
$data['join']['joinus_surname'] = $cs_user['users_surname'];
    
$data['join']['joinus_age'] = $cs_user['users_age'];
    
$data['join']['joinus_country'] = $cs_user['users_country'];
    
$data['join']['joinus_place'] = $cs_user['users_place'];
    
$data['join']['joinus_email'] = $cs_user['users_email'];
    
$data['if']['pass'] = 1;
    
$data['if']['nopass'] = 0;
  }
}

if (!empty(
$data['head']['getmsg'])) {
  
$data['lang']['body'] = $cs_lang['new_join'];
}
elseif(!isset(
$_POST['submit'])) {
  
$data['lang']['body'] = $cs_lang['body_new'];
}
elseif(!empty(
$error)) {
  
$data['lang']['body'] = $errormsg;
}

if(!empty(
$data['if']['form']) AND (!empty($error) OR !isset($_POST['submit']))) {

  foreach(
$data['join'] AS $key => $value)
  
$data['join'][$key] = cs_secure($value);

  
$data['join']['date'] = cs_dateselect('age','date',$data['join']['joinus_age']);
  
$data['join']['country_url'] = cs_html_img('/symbols/countries/' $data['join']['joinus_country'] . '.png',0,0,'id="country_1"');
  
$data['country'] = array();
  
$run 0;
  foreach (
$cs_country AS $short => $full) {
    
$data['country'][$run]['short'] = $short;
    
$data['country'][$run]['selection'] = $short == $data['join']['joinus_country'] ? ' selected="selected"' '';
    
$data['country'][$run]['full'] = $full;
    
$run++;
  }
  
$cid "squads_own = '1' AND squads_joinus = '0'";
  
$squads_data cs_sql_select(__FILE__,'squads','squads_name, squads_id, squads_own, squads_joinus',$cid,'squads_name',0,0);
  
$data['squad']['list'] = cs_dropdown('squads_id','squads_name',$squads_data,$data['join']['squads_id']);
  
$data['abcode']['smileys'] = cs_abcode_smileys('joinus_more');
  
$data['abcode']['features'] = cs_abcode_features('joinus_more');
  
$data['joinus']['rules_selected'] = !empty($data2['join']['joinus_rules']) ? 'checked="checked"' '';
  if(!empty(
$captcha)) {
          
$data['join']['captcha_img'] = cs_html_img('mods/captcha/generate.php?time=' cs_time());
          
$data['if']['captcha'] = 1;
  }

}
elseif(!empty(
$data['if']['form'])) {

  if(empty(
$account['users_id'])) {
    global 
$cs_db;
    if(
$cs_db['hash'] == 'md5') { $data['join']['users_pwd'] = md5($data['join']['users_pwd']);
    } elseif(
$cs_db['hash'] == 'sha1') { $data['join']['users_pwd'] = sha1($data['join']['users_pwd']); }
  }

  
$data['join']['joinus_since'] = cs_time();
  
$joinus_cells array_keys($data['join']);
  
$joinus_save array_values($data['join']);
  
cs_sql_insert(__FILE__,'joinus',$joinus_cells,$joinus_save);

  
$joinus_id cs_sql_insertid(__FILE__);

  
cs_cache_delete('count_joinus');

  require_once(
'mods/notifymods/functions.php');
  
notifymods_mail('joinus'$account['users_id']);

  
$tables "joinus ju INNER JOIN {pre}_members mem ON ju.squads_id = mem.squads_id AND mem.members_admin = '1' ";
  
$tables .= 'INNER JOIN {pre}_squads sq ON ju.squads_id = sq.squads_id';
  
$cells 'ju.squads_id AS squads_id, mem.users_id AS users_id, sq.squads_name AS squads_name';
  
$select cs_sql_select(__FILE__,$tables,$cells,"ju.joinus_id = '" $joinus_id "'",0,0,0);
  
$select_count count($select);

  for (
$run 0$run $select_count$run++) {
    
$user cs_sql_select(__FILE__,'users','users_id',"users_id = '" $select[$run]['users_id'] . "'");
    
$message['users_id'] = '1';
    
$message['users_id_to'] = $user['users_id'];
    
$message['messages_time'] = cs_time();
    
$message['messages_subject'] = $cs_lang['new_joinus'] . $select[$run]['squads_name'];
    
$message['messages_text'] = $cs_lang['new_joinus_text'] . $select[$run]['squads_name'] . $cs_lang['new_joinus_text2'];
    
$message['messages_text'] .= ' ' $cs_lang['new_joinus_text3'];
    
$message['messages_show_receiver'] = '1';
    
$messages_cells array_keys($message);
    
$messages_save array_values($message);
    
cs_sql_insert(__FILE__,'messages',$messages_cells,$messages_save);
  }
  
cs_redirect($cs_lang['new_done'],'joinus','new');
}

echo 
cs_subtemplate(__FILE__,$data,'joinus','new');


------------------


www.iv-gaming.de | www.iv-artwork.de

Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 12 - 2015-02-08 at 8:45 AM
Welche Funktion regelt denn, dass aus den n's ein Zeilenumbruch wird?
Ich würde das Problem gerne mal beseitigen.


------------------


www.iv-gaming.de | www.iv-artwork.de

Inactive
|
sgraewe ClanSphere Team

Supporter
Supporter




Posts: 6116
# Answer: 13 - 2015-02-08 at 11:57 AM
das regelt php


Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 14 - 2015-02-08 at 1:20 PM
Ja das hab ich mir fast gedacht.
Aber wo und was für ein Befehl regelt das denn genau?
Ich weiss gar nicht, wo ich gucken muss.



------------------


www.iv-gaming.de | www.iv-artwork.de

Inactive
|
Deaktiviert

Supporter
Supporter



Posts: 1287
# Answer: 15 - 2015-02-08 at 1:54 PM
Schätzungsweise hier:
https://github.com/ClanSphere/ClanSphere/blob/master/mods/contact/func_mail.php

Das sind halt Sachen, welche so nicht vorgesehen wurden. Das System ist halt schon was älter leider.


Inactive
|
Tress13
Thread author


Highlander




Location: Lüdenscheid
Posts: 3048
# Answer: 16 - 2015-02-08 at 3:54 PM
Aber ich habe doch an dieser Datei überhaupt nichts geändert.


------------------


www.iv-gaming.de | www.iv-artwork.de

Inactive
|
Deaktiviert

Supporter
Supporter



Posts: 1287
# Answer: 17 - 2015-02-08 at 5:34 PM
Tress, das Problem ist, dass du am gesamten CMS rumgebaut hast, welches teilweise auf anderen Modulen aufbaut etc. Wir alle können nicht wirklich wissen, was du geändert hast, was Support doch schwierig macht.


Inactive
|
Answers: 17
Page [1]


You must be registered.


ClanSphere Project - Mailus - Imprint - Disclaimer - Scriptinfo