Google+

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coduri
#1
Salutare,
Mi-am instalat si eu pluginul max post view si doresc imi spuneti si mie codurile in engleza de la [iniciar_sesion] si register.

Multumesc .
#2
Nu prea am inteles ce anume ceri. Poti te rog sa explici ?

Cu stima,
R. Bogdan
http://www.trustnetsolutions.ro Gazduire web si inregistrare domenii
#3
Doresc codurile bbcode de inregistrare si login daca se poate . Multumesc.
#4
(03-05-2011, 12:52 AM)costyn33l Wrote: Doresc codurile bbcode de inregistrare si login daca se poate . Multumesc.
Astea sunt coduri interne ale pluginului... Va trebui sa modifici pluginul daca doresti sa schimbi alea din spaniola in engleza (sau in ce limba or fi alea). De asemenea se poate sa aiba vreo setare prin care se poate defini acel cuvant din componenta bbcode. Poti posta aici continutul pluginului?
Users : collective term for those who use computers. Users are divided into three types : novice, intermediate and expert.
Novice users : people who are afraid that simply pressing a key might break their computer.
Intermediate users : people who don`t know how to fix their computer after they`ve just pressed a key that broke it.
Expert users : people who break other people`s computers.
#5
Quote:<?php
$plugins->add_hook("showthread_start", "MaxPostViewsGuest");

function MaxPostViewsGuest_info()
{
return array(
"name" => "Max Post Views Guest",
"description" => "Limita el numero de post que pueden ver los invitados",
"website" => "mailto:nicedo_eeos@hotmail.com",
"author" => "Edson Ordaz developer de SoporteMyBB",
"authorsite" => "mailto:nicedo_eeos@hotmail.com",
'version' => '1.0',
"guid" => "231ea7c6c1e1ca8863a5933f127245f7",
"compatibility" => "*"
);
}

function MaxPostViewsGuest_activate()
{
global $mybb, $db;

$MaxPostViewsGuest = array(
"gid" => "NULL",
"name" => "MPVG",
"title" => "Max Post Views Guest",
"description" => "Limita el numero de post que pueden ver los invitados",
"disporder" => "0",
"isdefault" => "no",
);
$db->insert_query("settinggroups", $MaxPostViewsGuest);
$gid = $db->insert_id();

$MaxPostViewsGuest_1 = array(
"name" => "MaxPostViewsGuest",
"title" => "Numero de post a ver",
"description" => "ingresa el numero de post maximo a ver los invitados (ingresa 0 para deshabilitar)",
"optionscode" => "text",
"value" => "5",
"disporder" => "1",
"gid" => intval($gid),
);

$MaxPostViewsGuest_2 = array(
"name" => "MaxPostViewsGuest_text",
"title" => "Mensaje de error",
"description" => "ingresa el numero de post maximo a ver los invitados (ingresa 0 para deshabilitar) puedes usar<br />
<b>[MaxPost]</b> Para mostrar el numeor maximo de post que un invitado puede ver<br />
<b>[Registrarse]</b> Para mostrar la palabra Registrarse con link hacia el registro<br />
<b>[iniciar_sesion]</b> Para mostrar la palabra Iniciar sesion con Link hacia el logueo",
"optionscode" => "textarea",
"value" => "Has limitado el maximo numero de post ([MaxPost]) que puedes ver como invitado. Para remover este mensaje debes dar click en [Registrarse] y podras ver todos los post normal!
<br /><br />
Ya eres miembro? Entonces da click en [iniciar_sesion] y se eliminara este mensaje.",
"disporder" => "2",
"gid" => intval($gid),
);
$db->insert_query("settings",$MaxPostViewsGuest_1);
$db->insert_query("settings",$MaxPostViewsGuest_2);

rebuild_settings();

}

function MaxPostViewsGuest_deactivate()
{
global $db;
$db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='MPVG'");
$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='MaxPostViewsGuest'");
$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='MaxPostViewsGuest_text'");

rebuild_settings();
}

function MaxPostViewsGuest()
{
global $mybb;

if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'])
return;
$text_error = $mybb->settings['MaxPostViewsGuest_text'];
if(!isset($mybb->cookies['MaxPostViewsGuest']))
{
my_setcookie("MaxPostViewsGuest", "1");
}
else
{
$MaxPostViewsGuest = $mybb->cookies['MaxPostViewsGuest'] + 1;
my_setcookie("MaxPostViewsGuest", $MaxPostViewsGuest);
}

if($mybb->cookies['MaxPostViewsGuest'] > $mybb->settings['MaxPostViewsGuest'])
{
$errormessage = <<<MESSAGE
{$text_error}
MESSAGE;
$errormessage = preg_replace("!\[MaxPost\]!Us", $mybb->settings['MaxPostViewsGuest'], $errormessage);
$errormessage = preg_replace("!\[Registrarse\]!Us", "<a href=member.php?action=register>Registrarse</a>", $errormessage);
$errormessage = preg_replace("!\[iniciar_sesion\]!Us", "<a href=member.php?action=login>Iniciar sesion</a>", $errormessage);
error($errormessage);
}
}

?>

AM pus codul pluginului .
#6
Randurile urmatoare sunt cele mai importante din plugin:

PHP Code:
$errormessage = preg_replace("!\[MaxPost\]!Us", $mybb->settings['MaxPostViewsGuest'], $errormessage);
$errormessage = preg_replace("!\[Registrarse\]!Us", "<a href=member.php?action=register>Registrarse</a>", $errormessage);
$errormessage = preg_replace("!\[iniciar_sesion\]!Us", "<a href=member.php?action=login>Iniciar sesion</a>", $errormessage);

De exemplu bbcodeul [Registrarse] este inlocuit cu un url (mai precis cu asta : <a href=member.php?action=register>Registrarse</a>)... Si in mod asemanator si pentru restul.
Cam astea ar fi traducerile dupa mine:

PHP Code:
$errormessage = preg_replace("!\[inregistrare\]!Us", "<a href=member.php?action=register>Inregistrare</a>", $errormessage);
$errormessage = preg_replace("!\[autentificare\]!Us", "<a href=member.php?action=login>Autentificare</a>", $errormessage);

Users : collective term for those who use computers. Users are divided into three types : novice, intermediate and expert.
Novice users : people who are afraid that simply pressing a key might break their computer.
Intermediate users : people who don`t know how to fix their computer after they`ve just pressed a key that broke it.
Expert users : people who break other people`s computers.
#7
Mersi.
Poti inchide topicul .
#8
Inchis !


Forum Jump:


Users browsing this thread: 1 Guest(s)