MyBB.de Forum

Normale Version: unbeantwortete themen für 1.4?
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2
hallo ich habe euer plugin entdeckt und wollte frage ob es das auch für 1.4 nun gibt?? wenn ja wo kann ich das finden?
Ich habe keines gefunden. Allerdings könntest du das für MyBB 1.2 anpassen.
leider kann ich sowas garnicht.... ich hab mal es versucht, aber das ging in hose... kannst du sowas?
kann jemand das machen?

hier der inhalt:

Zitat:<?php
/**
* Mod Name: Show Unanwsered Threads
* Copyright Zaher1988 - http://techex.techindo.com
*/


function sua_info()
{
return array(
"name" => "Zeige unbeantwortete Themen",
"description" => "Zeigt alle Themen ohne Antworten.",
"website" => "http://www.thetechex.net",
"author" => "Zaher1988",
"authorsite" => "mailto:zaher1988@gmail.com",
"version" => "1.0",
);
}

function sua_activate()
{

global $db, $mybb, $lang, $templates;

$language = $mybb->settings['bblanguage'];
$tlurl = "./inc/languages/$language/global.lang.php";

//edit txt file
$fh = fopen($tlurl, "r") or cperror("Could not open file!"); //OPEN FILE
$data = fread($fh, filesize($tlurl)) or cperror("Could not read file!"); //MAKE TEMPORARY STRING
fclose($fh); //CLOSE FILE AGAIN
$newdata = preg_replace('#'.preg_quote('$l[\'welcome_todaysposts\']').'#','$l[\'welcome_unanswered\'] = "View Unanswered Threads";
$l[\'welcome_todaysposts\']',$data); //REPLACE IN STRING
$fw = fopen($tlurl, "w") or cperror('Could not open file!'); //OPEN FILE AGAIN
$fb = fwrite($fw, $newdata) or cperror('Could not write to file'); //WRITE STRING TO FILE
fclose($fw); //CLOSE FILE AGAIN

//Let's edit search

$fh = fopen('./search.php', "r") or cperror("Could not open file!"); //OPEN FILE
$data = fread($fh, filesize('./search.php')) or cperror("Could not read file!"); //MAKE TEMPORARY STRING
fclose($fh); //CLOSE FILE AGAIN
$newdata = preg_replace('#'.preg_quote('elseif($mybb->input[\'action\'] == "do_search")').'#','elseif($mybb->input[\'action\'] == "unanswered")
{
$wheresql = "1=1";
$wheresql .= " AND t.replies=\'0\'";

$searcharray = array(
"uid" => $mybb->user[\'uid\'],
"dateline" => time(),
"ipaddress" => $ipaddress,
"wheresql" => addslashes($wheresql),
"lookin" => "p.message",
"showposts" => 1
);
$db->insert_query(TABLE_PREFIX."searchlog", $searcharray);
$plugins->run_hooks("search_do_search_process");
$sid = $db->insert_id();
eval("\\\$redirect = \"".$templates->get("redirect_searchresults")."\";");
redirect("search.php?action=results&sid=$sid", $lang->redirect_searchresults);
}
elseif($mybb->input[\'action\'] == "do_search")',$data); //REPLACE IN STRING
$fw = fopen('./search.php', "w") or cperror('Could not open file!'); //OPEN FILE AGAIN
$fb = fwrite($fw, $newdata) or cperror('Could not write to file'); //WRITE STRING TO FILE
fclose($fw); //CLOSE FILE AGAIN

require "./inc/adminfunctions_templates.php";

find_replace_templatesets("header_welcomeblock_member", '#'.preg_quote('<a href="search.php?action=getdaily">$lang->welcome_todaysposts</a> |').'#', '<a href="search.php?action=getdaily">$lang->welcome_todaysposts</a> | <a href="search.php?action=unanswered">\$lang->welcome_unanswered</a> |');

}


function sua_deactivate()
{

global $db, $mybb, $lang, $templates;
$language = $mybb->settings['bblanguage'];
$tlurl = "./inc/languages/$language/global.lang.php";

//edit txt file
$fh = fopen($tlurl, "r") or cperror("Could not open file!"); //OPEN FILE
$data = fread($fh, filesize($tlurl)) or cperror("Could not read file!"); //MAKE TEMPORARY STRING
fclose($fh); //CLOSE FILE AGAIN
$newdata = preg_replace('#'.preg_quote('$l[\'welcome_unanswered\'] = "View Unanswered Threads";
$l[\'welcome_todaysposts\']').'#','$l[\'welcome_todaysposts\']',$data); //REPLACE IN STRING
$fw = fopen($tlurl, "w") or cperror('Could not open file!'); //OPEN FILE AGAIN
$fb = fwrite($fw, $newdata) or cperror('Could not write to file'); //WRITE STRING TO FILE
fclose($fw); //CLOSE FILE AGAIN


//Remove Sad

$fh = fopen('./search.php', "r") or cperror("Could not open file!"); //OPEN FILE
$data = fread($fh, filesize('./search.php')) or cperror("Could not read file!"); //MAKE TEMPORARY STRING
fclose($fh); //CLOSE FILE AGAIN
$newdata = preg_replace('#'.preg_quote('elseif($mybb->input[\'action\'] == "unanswered")
{
$wheresql = "1=1";
$wheresql .= " AND t.replies=\'0\'";

$searcharray = array(
"uid" => $mybb->user[\'uid\'],
"dateline" => time(),
"ipaddress" => $ipaddress,
"wheresql" => addslashes($wheresql),
"lookin" => "p.message",
"showposts" => 1
);
$db->insert_query(TABLE_PREFIX."searchlog", $searcharray);
$plugins->run_hooks("search_do_search_process");
$sid = $db->insert_id();
eval("\\\$redirect = \"".$templates->get("redirect_searchresults")."\";");
redirect("search.php?action=results&sid=$sid", $lang->redirect_searchresults);
}
elseif($mybb->input[\'action\'] == "do_search")').'#','elseif($mybb->input[\'action\'] == "do_search")',$data); //REPLACE IN STRING
$fw = fopen('./search.php', "w") or cperror('Could not open file!'); //OPEN FILE AGAIN
$fb = fwrite($fw, $newdata) or cperror('Could not write to file'); //WRITE STRING TO FILE
fclose($fw); //CLOSE FILE AGAIN

require "./inc/adminfunctions_templates.php";

find_replace_templatesets("header_welcomeblock_member", '#'.preg_quote('<a href="search.php?action=getdaily">$lang->welcome_todaysposts</a> | <a href="search.php?action=unanswered">$lang->welcome_unanswered</a> |').'#', '<a href="search.php?action=getdaily">$lang->welcome_todaysposts</a> |');
}

?>

oder sagt mir einfach was ich ändern muss ich machs dann...denn ich weiss nicth was ändern soll...ich hab hier geschaut, aber ich find nichts zum ändern

http://blog.mybboard.net/2008/07/11/plug...n-authors/
okay ich habs selber gelöst...hoffentlich hat der hesteller nichts da ich es angepasst hab für 1.4?
Solange du es nicht veröffentlichst (ggf. sagt die Lizenz etwas anderes), ist das kein Problem.
Hallo,

das Plugin hatte doch Animus gemacht wenn ich mich recht erinnere und ich hätte es auch gerne wieder für mein Board.

Reisender, könntest du es mir bitte per PN zukommen lassen? Ich kann diese Änderungen nämlich auch nicht und Animus ist zur Zeit im Zivistress soviel ich weiß.
HI, alle zusammen!

Ich hab das Plugin umgeschrieben (also für 1.4.x) und läufz schon einige Zeit bei mir, und hab keine Probs damit.
Copyright und Autorinfo hab ich unverändert gelassen, nur die Versionsnummer (damit ich das unterscheiden kann *g*) hab ich geändert.

LG, GM!
@ snAke:

Das ist nochmal ne ganz andere Funktion.

LG, GM!
Seiten: 1 2