WordPress and Joomla

Add a NextPage button on WorldPress Editor

Open the functions.php in your theme directory. For example, if your theme is tigra, then open the functions.php in <wordpress-path>/wp-content/themes/tiga.

Add the following lines at the bottom of functions.php, after the last close bracket (?>)

<?php
add_filter(‘mce_buttons’, ‘add_nextpage’);

function add_nextpage($buttons) {
if (!in_array(‘wp_page’, $buttons)) {
if (!in_array(‘wp_more’, $buttons)) {
$last = array_pop($buttons);
$buttons[] = “wp_page”;
$buttons[] = $last;
}else{
$txt = implode(‘|’, $buttons);
$txt = str_replace(‘wp_more|’,'wp_more|wp_page|’, $txt);
$buttons = explode(‘|’, $txt);
}
}
return $buttons;
}

?>

Refresh the browser. You should see the new button being added.

pic2

WordPress and Joomla

Comments (4)

Permalink

Joomla Site Quick Start

In this guide, I will coverĀ  how to set up a Content Management Site powered by Joomla 1.5.x. This document is by no mean complete, but the section that shows one how to embed a flash MP3 player as a custom module should be very helpful to many.

Continue Reading »

Pages: 1 2 3 4 5 6 7 8

WordPress and Joomla

Comments (1)

Permalink

Add Scroll Areas to WordPress Posts

I wanted to post some codes to several posts and set out to find ways to include longer code snippets on WordPress posts. Here are the steps I took to enable scrolling area for code snippets:

1. Go to your WordPress theme editor and either enable external style.css if not already enabled. I use tiga theme and had to enable the external style sheet.

2. Go to wp-content/themes/your-theme. Add the following code snippet to the style.css of your current theme

div.scroll {
height: 200px;
width: 300px;
overflow: auto;
border: 1px solid #666;
background-color: #ccc;
padding: 8px;
}

3. Then create a new post and paste the following in HTML mode

<div>
<p>This is a scrolling are created with the CSS property overflow.</p>
<p>
<span style="color: red;">This is red color</span>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p>
<p>This is a normal paragraph.
<span style="font-weight: bold; font-size: 22px;">This is big bold text</span>
</p>
<p>This scrolling are can contain normal html like <a href="index.php">link</a></p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p>
</div>

This is a scrolling are created with the CSS property overflow.

This is red color
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.

This is a normal paragraph.
This is big bold text

This scrolling are can contain normal html like link

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.

Reference:

http://www.domedia.org/oveklykken/css-div-scroll.php

WordPress and Joomla

Comments (4)

Permalink