News:

Wondering if this will always be free?  See why free is better.

Main Menu

Select All & Copy Code To Clipboard

Started by karlbenson, October 14, 2007, 04:51:27 PM

Previous topic - Next topic

Kimmie

HI its me again :). Im not sure how to explain this so I will start from the beginning..hehe.

I decide to install the mod via the package manager and then modify the Subs file (less for me to mess up  lol). No errors in the error log, however, the mod isnt working. It hasnt made any changes to the "code" part. Since I have other mods that affect that file - some of the code is in the same section that this mod changes, I couldnt replace that entire section with what the parser said to because it would mess up the other mod(s) that also use that section, so what I did was compare what code you added to that area with what is in my original subs file and made the necessary changes. Basically all I saw that was different was these two sections of code:

// SELECT ALL AND COPY CODE TO CLIPBOARD MOD
static $codecounter = 0;
$codecounter++;
$data = \'<div class="codeheader">\' . $txt[\'smf238\'] . \': \'
.\'<a href="javascript:void(0)" title="\'.$txt[\'codeselectall\'].\'" onclick="javascript:selectall(\\\'code_a\'.$codecounter.\'\\\');return false;">\'.$txt[\'codeselectall\'].\'</a>\'
.\' \'.$txt[\'codedivider\'].\' <a href="javascript:void(0)" title="\'.$txt[\'codecopytoclipboard\'].\'" onclick="javascript:copy(\\\'code_a\'.$codecounter.\'\\\');return false;">\'.$txt[\'codecopytoclipboard\'].\'</a>\'
.\'</div><div class="code" id="code_a\'.$codecounter.\'">\' . ($context[\'browser\'][\'is_gecko\'] ? \'<pre style="margin-top: 0; display: inline;">\'.$data.\'</pre>\' : $data) . \'</div>\';
// END OF SELECT ALL AND COPY TO CLIPBOARD MOD


AND

// SELECT ALL AND COPY CODE TO CLIPBOARD MOD
static $codecounter = 0;
$codecounter++;
$data[0] = \'<div class="codeheader">\' . $txt[\'smf238\'] . \': (\'.$data[1].\') \'
.\'<a href="javascript:void(0)" title="\'.$txt[\'codeselectall\'].\'" onclick="javascript:selectall(\\\'code_b\'.$codecounter.\'\\\');return false;">\'.$txt[\'codeselectall\'].\'</a>\'
.\' \'.$txt[\'codedivider\'].\' <a href="javascript:void(0)" title="\'.$txt[\'codecopytoclipboard\'].\'" onclick="javascript:copy(\\\'code_b\'.$codecounter.\'\\\');return false;">\'.$txt[\'codecopytoclipboard\'].\'</a>\'
.\'</div><div class="code" id="code_b\'.$codecounter.\'">\' . ($context[\'browser\'][\'is_gecko\'] ? \'<pre style="margin-top: 0; display: inline;">\'.$data[0].\'</pre>\' : $data[0]) . \'</div>\';
// END OF SELECT ALL AND COPY TO CLIPBOARD MOD


I added them directly after both of these codes in that file just like the parser said to:

// Fix the PHP code stuff...
$data[0] = str_replace("<pre style=\"display: inline;\">\t</pre>", "\t", implode(\'\', $php_parts));


Could you take a look at my Subs.php file and see if you see anything I missed? It would be greatly appreciated if you could :).

The 1st attachment is my Subs file BEFORE installing the mod. The second one is after I made the edit.

fdLP.

bumping it , need it fixed , its not working , it doesnt copy the text when it select it .. Using 1.1.9 (sorry if its aint allowed)


Gaming-Devs.com | New Programming Forum

fdLP.

anyone got a similar mod working on 1.1.9?


Gaming-Devs.com | New Programming Forum

Advertisement: