MyBB.de Forum
Problem mit find_replace_templatesets nach Upgrade auf 1.4 - Druckversion

+- MyBB.de Forum (https://www.mybb.de/forum)
+-- Forum: Anpassungen (https://www.mybb.de/forum/forum-47.html)
+--- Forum: Plugin-Diskussionen (https://www.mybb.de/forum/forum-38.html)
+--- Thema: Problem mit find_replace_templatesets nach Upgrade auf 1.4 (/thread-11093.html)



Problem mit find_replace_templatesets nach Upgrade auf 1.4 - Navigator - 26.09.2008

Moin Moin, ich habe heute das Upgrade auf Version 1.4.2 gewagt und erwartungsgemäss musste ich mein Pluginanpassen (An dem ich schon lange weiter coden wollte Big Grin) und soweit habe ich auch alles gebacken bekommen jedoch verweigert die Funktion find_replace_templatesets mir den String in den Footer zu legen.

Wurde da etwa auch etwas geändert? wobei im Index macht die funktion alles korrekt und fügt $toplist da hinzu wo es hinsoll und nimmt es da auch sauber wieder weg.

PHP-Code:
function toplist_activate()
{
find_replace_templatesets('index''#{\$forums}(\r?)\n#'"{\$forums}\n{\$toplist}\n");
find_replace_templatesets('footer''#MyBB Group</a></strong>\n#','MyBB Group</a></strong><br>Top List 0.8.3 Beta &copy; <a href="http://www.Exp-Soft.de" target="_blank">Exp-Soft</a>');
}

function 
toplist_deactivate()
{
  
find_replace_templatesets("index"'#{\$toplist}(\r?)\n#'""0);
  
find_replace_templatesets('footer''#<br>Top List 0.8.3 Beta &copy; <a href="http://www.Exp-Soft.de" target="_blank">Exp-Soft</a>#'""0);


mfg. Navigator


RE: Problem mit find_replace_templatesets nach Upgrade auf 1.4 - linwinman - 26.09.2008

Hallo Navigator,

den String, den du im Template "footer" ersetzen willst, gibt es in dieser Form nicht mehr.

Versuche es einmal hiermit
PHP-Code:
function toplist_activate()
{
find_replace_templatesets('index''#{\$forums}(\r?)\n#'"{\$forums}\n{\$toplist}\n");
find_replace_templatesets('footer''#MyBB Group</a>.<br />#','<strong>MyBB Group</strong></a>.<br />Top List 0.8.3 Beta &copy; <a href="http://www.Exp-Soft.de" target="_blank">Exp-Soft</a>');

function 
toplist_deactivate()
{
find_replace_templatesets("index"'#{\$toplist}(\r?)\n#'""0);
find_replace_templatesets('footer''#<strong>MyBB Group</strong></a>.<br />Top List 0.8.3 Beta &copy; <a href="http://www.Exp-Soft.de" target="_blank">Exp-Soft</a>#'"MyBB Group</a>.<br />"0); 



RE: Problem mit find_replace_templatesets nach Upgrade auf 1.4 - Navigator - 26.09.2008

Hi, ich hab das mal ausprobiert aber das hilft auch nicht,

hier mal nen auszug aus dem footer template vom default.

Zitat:<br />
<div class="bottommenu"><span class="smalltext"><a href="{$mybb->settings['contactlink']}">{$lang->bottomlinks_contactus}</a> | <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a> | <a href="#top">{$lang->bottomlinks_returntop}</a> | <a href="#content">{$lang->bottomlinks_returncontent}</a> | <a href="<archive_url>">{$lang->bottomlinks_litemode}</a> | <a href="{$mybb->settings['bburl']}/misc.php?action=syndication">{$lang->bottomlinks_syndication}</a></span>
</div>
</div>
<hr class="hidden" />
<div id="copyright">
<div id="debug"><debugstuff></div>
<!-- You may NOT remove, modify or hinder the visibility of the MyBB copyright at any time.
It must contain the links to the MyBB website and be formatted appropriately.

Failure to comply with the above will result in prosecution to the full extent of the law.
This is free software, support us and we'll support you. -->
{$lang->powered_by} <a href="http://www.mybboard.net" target="_blank">MyBB</a> {$mybbversion}<br />
{$lang->copyright} &copy; 2002-{$copy_year} <strong><a href="http://www.mybboard.net" target="_blank">MyBB Group</a></strong>
<!-- End copyright -->
<br />
<br class="clear" />
</div>
</div>

Gruß Navigator


RE: Problem mit find_replace_templatesets nach Upgrade auf 1.4 - linwinman - 26.09.2008

Das ist nicht das Template "footer" für MyBB 1.4.2:

Auszug aus ".../install/resources/mybb_theme.xml":
Code:
            <br />
            <div class="bottommenu">
                <div class="float_right">{$lang_select}</div>
                <div>
                    <span class="smalltext"><a href="{$mybb->settings['contactlink']}">{$lang->bottomlinks_contactus}</a> | <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a> | <a href="#top">{$lang->bottomlinks_returntop}</a> | <a href="#content">{$lang->bottomlinks_returncontent}</a> | <a href="<archive_url>">{$lang->bottomlinks_litemode}</a> | <a href="{$mybb->settings['bburl']}/misc.php?action=syndication">{$lang->bottomlinks_syndication}</a></span>
                </div>
            </div>
            </div>
        <hr class="hidden" />
            <div id="copyright">
                <div id="debug"><debugstuff></div>
                <!-- You may NOT remove, modify or hinder the visibility of the MyBB copyright at any time.
                     It must contain the links to the MyBB website and be formatted appropriately.

                     Failure to comply with the above will result in prosecution to the full extent of the law.
                     This is free software, support us and we'll support you. -->
{$lang->powered_by} <a href="http://www.mybboard.net" target="_blank">MyBB{$mybbversion}</a>, &copy; 2002-{$copy_year} <a href="http://www.mybboard.net" target="_blank">MyBB Group</a>.<br />
                <!-- End copyright -->
                <br />
<br class="clear" />
<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code -->
{$auto_dst_detection}
        </div>
        </div>



RE: Problem mit find_replace_templatesets nach Upgrade auf 1.4 - Navigator - 26.09.2008

hm, kann was beim Upgraden schief gegangen sein? denn weder mit . noch ohne bzw den anderen versuchen funktioniert es..

Gruß Navigator


RE: Problem mit find_replace_templatesets nach Upgrade auf 1.4 - linwinman - 26.09.2008

Vllt. hilft dir dies weiter: führe einmal die Funktion "Admin-CP > Templates & Style > Templates > Finde aktualisierte Templates" aus.

Werden dir dort Templates aufgelistet? Falls ja, musst du sie aktualisieren. Du kannst sie dann ggf. zurücksetzen oder dir die Änderungen anzeigen lassen und manuell übernehmen.


RE: Problem mit find_replace_templatesets nach Upgrade auf 1.4 - Navigator - 26.09.2008

Danke erstmal aber ich musste mein Backup wieder einspielen das ganze Forum fing an zu lahmen ich die Software konnte plötzlich einige Threads nicht finden 2 User konnten sich nicht einloggen, ich konnte kein Optionen im User CP dauerhaft setzen und im Admin CP wurden mit Einstellungen doppelt und 3fach angezeigt ka was da beim Upgraden kaputtgegangen ist aber ich glaube das Upgrade System muss da noch ausgebessert werden so war der erhoffte umstieg auf ver 1.4.2 ne pleite für mich atm. Sad

Gruß Navigator.