 |
 |
 |
 |
 |
| Author |
Message |
Reddox
Joined: 19 Oct 2006 Posts: 17
|
|
How can I change the buttons in the writing panel? |
|
I'm sorry the title isn't so good, but it was the best I could do.
I want to change the looks and the value of these buttons:
I want to change them, so that instead of putting for instance
 |  | <b></b> | into the form, they put something else. Any idea on how (and where) I can do this?
Thanks
|
|
| Wed Sep 12, 2007 8:35 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2668 Location: Germany |
|
|
|
They are in inc/functions.inc.php -> Function:inserttag (line 329).
|
|
| Wed Sep 12, 2007 7:32 pm |
|
 |
Reddox
Joined: 19 Oct 2006 Posts: 17
|
|
|
|
Thanks for the quick reply. But when I played with the code, I couldn't open the admin panel at all. All I get is a white site. When I put back the old code, the problem disappeared.
|
|
| Wed Sep 12, 2007 10:34 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2668 Location: Germany |
|
|
|
Well, you have to be carefull. But it's definitely possible to edit it.
For example, if you change this:
 |  | <a href=\"javascript:insertext('<b>','</b>','$insert_location') |
to this:
 |  | <a href=\"javascript:insertext('<c>','</c>','$insert_location') |
the button will insert <c> tags instead of <b> tags (which is quite useless as <c> tags don't exist).
|
|
| Thu Sep 13, 2007 6:30 pm |
|
 |
Reddox
Joined: 19 Oct 2006 Posts: 17
|
|
|
|
Thanks again, I tried to just edit a little, but it didn't work.
Ok, this is how the code looks untouched:
 |  | $output = "
<div class=\"tags\"><a href=\"javascript:insertext('<br />','','$insert_location')\" title='Linebreak'><img src=".$config_http_script_dir."/skins/images/tags/br.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<hr />','','$insert_location')\" title='Horizontal line'><img src=".$config_http_script_dir."/skins/images/tags/hr.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<p>','</p>','$insert_location')\" title='Paragraph'><img src=".$config_http_script_dir."/skins/images/tags/p.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<b>','</b>','$insert_location')\" title='Bold'><img src=".$config_http_script_dir."/skins/images/tags/b.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<i>','</i>','$insert_location')\" title='Italic'><img src=".$config_http_script_dir."/skins/images/tags/i.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<u>','</u>','$insert_location')\" title='Underline'><img src=".$config_http_script_dir."/skins/images/tags/u.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<s>','</s>','$insert_location')\" title='Linethrough'><img src=".$config_http_script_dir."/skins/images/tags/s.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<sub>','</sub>','$insert_location')\" title='Subscript'><img src=".$config_http_script_dir."/skins/images/tags/sub.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<sup>','</sup>','$insert_location')\" title='Superscript'><img src=".$config_http_script_dir."/skins/images/tags/sup.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<font color="">','</font>','$insert_location')\" title='Font color'><img src=".$config_http_script_dir."/skins/images/tags/color.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<font size="">','</font>','$insert_location')\" title='Font size'><img src=".$config_http_script_dir."/skins/images/tags/size.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<ul>','</ul>','$insert_location')\" title='List'><img src=".$config_http_script_dir."/skins/images/tags/ul.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<li>','</li>','$insert_location')\" title='List element'><img src=".$config_http_script_dir."/skins/images/tags/li.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<a href="http://" target="_blank">','</a>','$insert_location')\" title='URL'><img src=".$config_http_script_dir."/skins/images/tags/url.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<a href="mailto:">','</a>','$insert_location')\" title='Email'><img src=".$config_http_script_dir."/skins/images/tags/mailto.gif border=0 align=middle></a>
<a href=\"#\" onclick=\"window.open('$PHP_SELF?mod=images&area=$insert_location', '_Addimage', 'height=450,resizable=yes,scrollbars=yes,width=500');return false;\" target=\"_Addimage\"><img src=".$config_http_script_dir."/skins/images/tags/img.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<div align="">','</div>','$insert_location')\" title='Align'><img src=".$config_http_script_dir."/skins/images/tags/align.gif border=0 align=middle></a></div>";
return $output;
|
The only tags I need are: <b></b>, <i></i>, <u></u>, <s></s> and <br />.
I also need a tag that puts in: <p class="ptp"> </p>
and one that puts in: <img src="" class="pp" />
What should I do?
|
|
| Fri Sep 14, 2007 9:56 am |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2668 Location: Germany |
|
|
|
 |  | function inserttag($insert_location){
global $config_http_script_dir;
$output = "
<div class=\"tags\"><a href=\"javascript:insertext('<br />','','$insert_location')\" title='Linebreak'><img src=".$config_http_script_dir."/skins/images/tags/br.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<b>','</b>','$insert_location')\" title='Bold'><img src=".$config_http_script_dir."/skins/images/tags/b.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<i>','</i>','$insert_location')\" title='Italic'><img src=".$config_http_script_dir."/skins/images/tags/i.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<u>','</u>','$insert_location')\" title='Underline'><img src=".$config_http_script_dir."/skins/images/tags/u.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<s>','</s>','$insert_location')\" title='Linethrough'><img src=".$config_http_script_dir."/skins/images/tags/s.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<p class="ptp">','</p>','$insert_location')\" title='Paragraph'><img src=".$config_http_script_dir."/skins/images/tags/p.gif border=0 align=middle></a>
<a href=\"javascript:insertext('<img src="" class="" />','','$insert_location')\" title='Paragraph'><img src=".$config_http_script_dir."/skins/images/tags/img.gif border=0 align=middle></a>
</div>";
return $output;
} |
|
|
| Fri Sep 14, 2007 10:53 am |
|
 |
eberswine

Joined: 26 Apr 2007 Posts: 123
|
|
|
|
Ok, here is a quick question along the same lines.
I am trying my best to revamp the AddNews section with new "codes" that suit ME!
Here is the problem:
I would want to add a button to the addNews section that has this code applied when pressed:
 |  | Men<!--firstpage-->
<pre>
</pre>
<!--nextpage-->Women<!--nexttitle-->
<pre>
</pre> |
As you can see, it is to add pages. I have running results to post ALL the TIME. And I have been just opening up a notepad copy of the code and doing some hard copy and pasting.
I can get the code in the addnews when pressed, that isn't the problem, the problem is trying to get the <br /> BREAKS or RETURNS in the code. Right now the code is applied like so:
 |  | Men<!--firstpage--><pre></pre><!--nextpage-->Women<!--nexttitle--><pre></pre> |
I tried "/n" and <br /> but coming up with errors..
THANKS.
|
|
| Sat Apr 19, 2008 9:01 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2668 Location: Germany |
|
|
|
Well, the following example works:
 |  | <textarea id="story"></textarea>
<input type="button" onclick="document.getElementById('story').value = 'Men<!--firstpage-->\n<pre>\n\n</pre>\n<!--nextpage-->Women<!--nexttitle-->\n<pre>\n\n</pre>'" value="Insert" /> |
Make sure that the text you want to insert is on one line otherwise you get errors.
|
|
| Tue Apr 22, 2008 6:12 pm |
|
 |
eberswine

Joined: 26 Apr 2007 Posts: 123
|
|
|
|
 |  | Well, the following example works:
 |  | <textarea id="story"></textarea>
<input type="button" onclick="document.getElementById('story').value = 'Men<!--firstpage-->\n<pre>\n\n</pre>\n<!--nextpage-->Women<!--nexttitle-->\n<pre>\n\n</pre>'" value="Insert" /> |
Make sure that the text you want to insert is on one line otherwise you get errors. |
FI-DD,
I tried this and it didn't work?
 |  | <a href=\"javascript:insertext('Men<!--firstpage-->\n<pre>\n\n</pre>\n<!--nextpage-->Women<!--nexttitle-->\n<pre>\n\n</pre>','</pre>','$insert_location')\" title='Results'><img src=".$config_http_script_dir."/skins/images/tags/page.gif border=0 align=middle></a> |
|
|
| Tue May 06, 2008 8:41 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2668 Location: Germany |
|
|
|
 |  | <a href=\"javascript:insertext('Men\<!--firstpage-->\\n<pre>\\n\\n</pre>\\n\<!--nextpage-->Women\<!--nexttitle-->\\n<pre>\\n\\n</pre>','</pre>','$insert_location')\" title='Results'><img src=".$config_http_script_dir."/skins/images/tags/page.gif border=0 align=middle></a> |
|
|
| Thu May 08, 2008 5:18 pm |
|
 |
eberswine

Joined: 26 Apr 2007 Posts: 123
|
|
|
|
SICK.
works great. thanks. FIDD
Here is a snapshot of my early customization in the add news mod.

Last edited by eberswine on Sat May 10, 2008 10:55 pm; edited 4 times in total |
|
| Thu May 08, 2008 9:47 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1802 Location: US |
|
|
|
your snapshot no load i wanted to see what you did!
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Sat May 10, 2008 5:45 pm |
|
 |
eberswine

Joined: 26 Apr 2007 Posts: 123
|
|
|
|
updated.
adding certain "codes" "snippets" that I use a lot.. also, it makes it easier when I have someone else update or make a website for them using CNR... just add another button.
lol

|
|
| Sat May 10, 2008 10:57 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|