Add adsense code after wordpress tag cloud

If we add <!–more–>, the content after will now show at homepage, and other categories. When visit the detailed post, the content after  <!–more–> will show.

 Now  I will teach you how to add adsense code within the function, that is to say, when we visit the detailed post, the adsense ads will show also, at other pages, it will not show.

 Go to wp-includes, open page-templates.php, search <span id=”more, and click the second results, at line 223, add your code within <span id=”more-‘ . $id . ‘”>Put your code here></span>

 Save and upload the page to your host.

Demo: www.wordpublish.com ,this site is on cartridges, and digital cameras.

Posted in WordPress. Comments Off on Add adsense code after wordpress tag cloud »

How do I show hidden files?

To enable file display from the server, create a .ftpaccess file with the line:
ListOptions “-a”

We often want to delete files in dreamhost, if the document contains .htaccess, we can not delete the document. Now we can use this method and delete all very easily.

If the above method does not function, you can try the following to displaying .htaccess with CuteFTP

To view hidden files on your remote host, follow these steps: (more…)

Posted in Apache, Web Hosting. Comments Off on How do I show hidden files? »

You don’t have permission to access the requested object of xampp

I am using Vista. I can not open:
http://localhost/security/lang.php?en

Access forbidden!
You don’t have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

It took me about 30 minutes and found this way to resolve the issure:

opened the file …\\\xampp\apache\conf\extra\httpd-xampp.conf

useing editplub open it and went to the line


Order deny,allow
Deny from all
Allow from localhost

changed this to

Deny From none
Allow from All

and saved the file , then i restarted xampp through Xampp control panel Application
stop and start function
and it worked and opened the security page very well
I then entered my passwords for all channels and when finished i went to the mentioned file and returned every thing as it was…

Posted in Apache. Comments Off on You don’t have permission to access the requested object of xampp »

PHP 5.3 and Magento

I was installing Magento version 1.3.2.1 on a XAMPP version 1.7.2 instalation for a friend, and I got an error on the very beginning of the installation:

Fatal error: Method Varien_Object::__tostring() cannot take arguments in /magento/lib/Varien/Object.php

With a small research I found out that there is a known issue with Magento and the PHP 5.3. Not a problem though, the solution was only 2 lines of code away. More specifically:

On the file /lib/Varien/Object.php (Line 484)

Change this:

public function ___toString(array $arrAttributes = array(), $valueSeparator=’,’)

To that:

public function __invoke(array $arrAttributes = array(), $valueSeparator=’,’)

and on the file /app/code/core/Mage/Core/Controller/Request/Http.php (Line 274)

Change this:

$host = split(‘:’, $_SERVER[‘HTTP_HOST’]);

To that:

$host = explode(’:’, $_SERVER[‘HTTP_HOST’]);

Posted in Other. Comments Off on PHP 5.3 and Magento »

How to add a link to the Thread Starter of Similar Threads?

I want to add a link to the Thread Starter of Similar Threads, ie:

<a target=”_blank” href=”http://forums.glassesadvisor.com/showthread.php?t=7224″>http://forums.glassesadvisor.com/showthread.php?t=7224</a>

The first Thread Starter of Similar Threads is Meadow. How to add a link to Meadow, if we click the link, I will be guided to Meadow’s profile page:
<a target=”_blank” href=”http://forums.glassesadvisor.com/member.php?u=2568″>http://forums.glassesadvisor.com/member.php?u=2568</a>

thanks.

A:template – showthread_similarthreadbit
<code>
<td nowrap=”nowrap” class=”alt2″></td>
<td nowrap=”nowrap” class=”alt2″></td>
<span class=”smallfont”><a href=”member.php?$session[sessionurl]u=$simthread[postuserid]”>$simthread[postusername]</a></span> </code>

Posted in Vbulletin. Comments Off on How to add a link to the Thread Starter of Similar Threads? »

WordPress 2.8 Template Tags/wp tag cloud

Usage

Default Usage
‘smallest’ => 8,
‘largest’ => 22,
‘unit’ => ‘pt’,
‘number’ => 45,
‘format’ => ‘flat’,
‘orderby’ => ‘name’,
‘order’ => ‘ASC’,
‘exclude’ => ,
‘include’ => ,
‘link’ => ‘view’,
‘taxonomy’ => ‘post_tag’,
‘echo’ => true ); ?>

By default, the usage shows:

smallest – The smallest tag (lowest count) is shown at size 8
largest – The largest tag (highest count) is shown at size 22
unit – Describes ‘pt’ (point) as the font-size unit for the smallest and largest values
number – Displays at most 45 tags
format – Displays the tags in flat (separated by whitespace) style
orderby – Order the tags by name
order – Sort the tags in ASCENDING fashion
exclude – Exclude no tags
include – Include all tags
link – view
taxonomy – Use post tags for basis of cloud
echo – echo the results
Parameters
smallest
(integer) The text size of the tag with the smallest count value (units given by unit parameter).
largest
(integer) The text size of the tag with the highest count value (units given by the unit parameter).
unit
(string) Unit of measure as pertains to the smallest and largest values. This can be any CSS length value, e.g. pt, px, em, %; default is pt (points).
number
(integer) The number of actual tags to display in the cloud. (Use ‘0’ to display all tags.)
format (more…)

Posted in WordPress. Comments Off on WordPress 2.8 Template Tags/wp tag cloud »

Share 1 set vbulletin code with multi vbulletin forums in one host

If you have several vbulletin licenses, and you only have very small web hosting. I can tell you a skill on how to share one set vbulletin code with multi vbulletin licenses.

add the following to config.php.

'configlocalhost.php',
'127.0.0.1'=>'config127.php',
);
$url = $arrays[$_SERVER['HTTP_HOST']];
include $url;
?>

and change the other 2 forums’ config.php to configlocalhost.php and config127.php.

that’s all.

Posted in Php Code, Vbulletin. Comments Off on Share 1 set vbulletin code with multi vbulletin forums in one host »

Text Vbulletin vistor ip

<if condition=”$showabiaoip==’117.95.53.162′”>
$showabiaoip <br />
</if>

If  the vistor’s ip is 117.95.53.162, then show the visitor’s ip, otherwise, do nothing.

Posted in Vbulletin. Comments Off on Text Vbulletin vistor ip »

Delet category and documents powerfully

';
unlink($parth.'/'.$file);
}
else myrmdir($parth.'/'.$file);
}
closedir($handle);
echo 'del category:'.$parth.'
';
rmdir($parth);
}
myrmdir('myparth');
?>

Chang myparth to the path you plan to del, save as del.php, upload del.php to the space you want to del document or category. All the files will be deleted.

Posted in Php Code. Comments Off on Delet category and documents powerfully »

How to show moderator on index forum if vbulletin?

Q:How to show moderator on index forum if vbulletin?

A: vBulletin version 3.0.x to 3.6.7PL1
Admin CP -> vBulletin Options -> vBulletin Options ->

Forum Listings Display Options -> Show Moderator Column

Q:Is it also possible to show the moderators below the board description?

A:
Just edit template(s): forumhome_forumbit_level1_post,

 forumhome_forumbit_level2_post and add code within

tags
$forum[moderators] You will then need to enable moderators column and then you will have to edit templates and remove column.
FORUMDISPLAY, FORUMHOME, forumhome_forumbit_level1_nopost, forumhome_forumbit_level2_nopost

Posted in Vbulletin. Comments Off on How to show moderator on index forum if vbulletin? »
King Php Science Designed by:KingPhp.com Welcome, you are from: 54.205.172.57