(14 May, 2010, 6:27 pm)Himura escribió: yo progrmame mi propia version, bastante sencilla y no la puedo mejorar mas ya que estoy sin pc
aca se los dejo
Código PHP:<?php
if ($thread['fid']=="2"){
$deficon = "19";
}
else if ($thread['fid']=="3"){
$deficon = "15";
}
else if ($thread['fid']=="5"){
$deficon = "10";
}
else if ($thread['fid']=="6"){
$deficon = "8";
}
else {
$deficon = "5";
}
<?php
else if ($thread['fid']=="x"){
$deficon = "x";
}
<?php
else {
$deficon = "x";
}
else if ($thread['fid']=="6"){
$deficon = "8";
<?php
else if ($thread['fid']=="6"){
$deficon = "8";
}
<?php
else {
$deficon = "x";
}
<?php
function thdeficon_run()
{
global $db, $mybb, $thread;
if ($thread['fid']=="2"){
$deficon = "19";
}
else if ($thread['fid']=="3"){
$deficon = "15";
}
else if ($thread['fid']=="5"){
$deficon = "10";
}
else if ($thread['fid']=="6"){
$deficon = "8";
}
else {
$deficon = "5";
}
if ($thread['icon']=="0"){
$new_icon = array("icon" => "{$deficon}");
$db->update_query("threads", $new_icon, "tid='".$thread['tid']."'");
}
}
<?php
function thdeficon_run()
{
global $db, $mybb, $thread;
if ($thread['icon']=="0"){
$new_icon = array("icon" => "x");
$db->update_query("threads", $new_icon, "tid='".$thread['tid']."'");
}
}
(15 May, 2010, 2:49 pm)Himura escribió: Dios man te falta mas comprensión lectora hombre, te recomiendo que leas aunque sea el diario de verdad...
lo de usar esto
Código PHP:<?php
else if ($thread['fid']=="6"){
$deficon = "8";
}
<?php
else {
$deficon = "x";
}
<?php
function thdeficon_run()
{
global $db, $mybb, $thread;
if ($thread['fid']=="2"){
$deficon = "19";
}
else if ($thread['fid']=="3"){
$deficon = "15";
}
else if ($thread['fid']=="5"){
$deficon = "10";
}
else if ($thread['fid']=="6"){
$deficon = "8";
}
else {
$deficon = "5";
}
if ($thread['icon']=="0"){
$new_icon = array("icon" => "{$deficon}");
$db->update_query("threads", $new_icon, "tid='".$thread['tid']."'");
}
}
<?php
function thdeficon_run()
{
global $db, $mybb, $thread;
if ($thread['icon']=="0"){
$new_icon = array("icon" => "x");
$db->update_query("threads", $new_icon, "tid='".$thread['tid']."'");
}
}
(15 May, 2010, 3:49 pm)Himura escribió: ok man jajaja aca te lo dejo falto que te lo instalara y posteara por ti xd lo quieres todo echo xd
<?php
/**
GNU puede Modificar y redistribuir
poner un icono por defecto
Himura http://forodarkxp.co.cc - http://mybb-es.com
*/
// Disallow direct access to this file for security reasons
if(!defined('IN_MYBB'))
{
die('Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.');
}
$plugins->add_hook("showthread_start", "thdeficon_run");
function thdeficon_info()
{
return array('name' => 'My Theread Default Icon',
'description' => 'añade el icono un icono de tema si no se a seleccionado ninguno',
'website' => 'http://mybb-es.com',
'author' => 'Himura',
'authorsite' => 'http://forodarkxp.co.cc',
'version' => '1.0',
'guid' => '',
'compatibility' => '1*'
);
}
function thdeficon_activate()
{
}
function thdeficon_deactivate()
{
}
function thdeficon_run()
{
global $db, $mybb, $thread;
if ($thread['icon']=="0"){
$new_icon = array("icon" => "21");
$db->update_query("threads", $new_icon, "tid='".$thread['tid']."'");
}
}
?>