Welcome, Guest. Please Login or Register.
May 17, 2024, 01:19:28 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Language Specific User Help  |  Español  |  guest sin mail mod « previous next »
Pages: [1] Reply Ignore Print
Author Topic: guest sin mail mod  (Read 1433 times)
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
guest sin mail mod
« on: April 15, 2002, 05:49:11 AM »
Reply with quote

hi, en mi foro los usarios no registratos a menudo no usan mails validos sino cosas como [email protected] y esto....

por eso a partir de hoy permiso mis "guests" escribir mensajes sin email (todavia tengo la ip si algo pasa..)

aqui el "mod"

<files>Sources/Post.php</files>

<search># If poster is a Guest then evaluate the legality of name and email
   if ($username == 'Guest') {
      $name = trim($name);
      if ($name == '' || $name == '_' || $name == ' ')
         fatal_error($txt[75]);
      if (strlen($name) > 25)
         fatal_error($txt[568]);
      if ($email == '')
         fatal_error($txt[76]);
      if (!preg_match("/^[0-9A-Za-z@\._\-]+$/",$email))
         fatal_error($txt[243]);
   }
</search>

<replace># If poster is a Guest then evaluate the legality of name and email
   if ($username == 'Guest') {
      $name = trim($name);
      if ($name == '' || $name == '_' || $name == ' ')
         fatal_error($txt[75]);
      if (strlen($name) > 25)
         fatal_error($txt[568]);
      if ($email == ''){}
      else {
      if (!preg_match("/^[0-9A-Za-z@\._\-]+$/",$email))
         fatal_error($txt[243]);
      }
   }
</replace>

<files>Sources/Display.php</files>

<search>if($muserID == '-1') {
   print "            <BR><a href=\"mailto:$memail\">$img[email_sm]</a>\n";
}else if ($userprofile[$mname]['hideEmail'] != "1" || $settings[7] == "Administrator" || $allow_hide_email != '1') {
   print "            $profbutton".$userprofile[$mname]['websiteUrl']." <a href=\"mailto:$memail\">$img[email_sm]</a>$sendm\n";
} else {
   print"    $profbutton{$userprofile[$mname]['websiteUrl']}$sendm \n";
}
</search>

<replace>if($muserID == '-1' && $memail !='') {
   print "            <BR><a href=\"mailto:$memail\">$img[email_sm]</a>\n";
}else if ($muserID == '-1' && $memail =='') {
}else if ($userprofile[$mname]['hideEmail'] != "1" || $settings[7] == "Administrator" || $allow_hide_email != '1') {
   print "            $profbutton".$userprofile[$mname]['websiteUrl']." <a href=\"mailto:$memail\">$img[email_sm]</a>$sendm\n";
} else {
   print"    $profbutton{$userprofile[$mname]['websiteUrl']}$sendm \n";
}
</replace>

eso es todo!

medi
« Last Edit: April 15, 2002, 05:52:03 AM by mediman » Logged

mainComm Dev Team
Nirvana
Jr. Member
**
Posts: 89


I hÄt£ My§elF & I wÅnT to Di£

WWW
Re:guest sin mail mod
« Reply #1 on: April 15, 2002, 04:27:08 PM »
Reply with quote

De nuevo exelente Medi  :o
Logged

Victor Simental :-)
Mi foro
Omar Bazavilvazo
YaBB SE Developer
YaBB God
*****
Posts: 2153


I never said I would stay to the end...

WWW
Re:guest sin mail mod
« Reply #2 on: April 15, 2002, 04:46:50 PM »
Reply with quote

pues si... como que algunos guests no les gusta dejar mail :)

muy bien medi.. jeje :)
Logged

Greetings from México!
http://omarbazavilvazo.com
Mi foro Español-Japonés
http://hablajapones.org
http://hablajapones.org/index.php/japones/tutoriales/b16.php

NO me manden IM para soporte o dudas
...Leo los foros como todos...
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Language Specific User Help  |  Español  |  guest sin mail mod « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.014 seconds with 21 queries.