Calendar

2008年六月
« 五   七 »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Translator

One guy WP-Codebox release suggestion

Hello –

Let me first tell you that I love this plugin. Today I had the brilliant idea of changing the ‘+’ and ‘-’ symbol that are in the upper right corner of the box. I wanted to use an image instead. At first I just changed the ‘main.php’ file. That made the images appear fine when the page loaded. Although, once clicked on, it would go back to the text version. I determined that the problem was with the javascript file. I found where I though should be changed and I got it to work fine in Firefox, but it’s getting stuck in Internet Explorer.

I’ve attached a text file of the changes that I’ve made. Is there any way that you can help me out with this?

Thank you so much!

Bill Fisher

?Download changes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
-------------------
main.php (original)
-------------------
$output .= "<a href=\"javascript:;\" onclick=\"toggle_collapse('p".$post->ID.$codeid."');\">[<span id=\"p".$post->ID.$codeid."_symbol\">";
		if (($cb_colla && (!($colla == "+"))) || ($colla == "-")){$output .= "+";} else {$output.= "-";}
		$output .= "</span>]</a>";
	  $output .= "</span>";
 
------------------
main.php (changed)
------------------
$output .= "<a href=\"javascript:;\" onclick=\"toggle_collapse('p".$post->ID.$codeid."');\"><span id=\"p".$post->ID.$codeid."_symbol\">";
		if (($cb_colla && (!($colla == "+"))) || ($colla == "-")){$output .= "<img src=\"xxx\" border=\"0\">";} else {$output.= "<img src=\"xxx\" border=\"0\">";}
		$output .= "</span></a>";
	  $output .= "</span>";
 
 
---------------------
codebox.js (original)
---------------------
	if(symbol = $(objname + '_symbol')) {
		symbol.innerHTML = symbol.innerHTML == '+' ? '-' : '+';
	}
 
--------------------
codebox.js (changed)
--------------------
	if(symbol = $(objname + '_symbol')) {
		symbol.innerHTML = symbol.innerHTML == '<img src="xxx" border="0">' ? '<img src="xxx" border="0">' : '<img src="xxx" border="0">';
	}

Leave a reply

  1. You will post the following soon.
    Go ahead and start typing.