PhpTips.im - Everything about php - Download CMS, find tips and tricks, code snippetz, classes and more and more...
Bookmark this page !
   

Articles

    Home » Articles » PHP Snippets
Browsing PHP Snippets RSS RSS

   Pages :   0     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     32     33     34     35     36     37     38     39     40     41     42     43     44     45     46     47     48     49     50     51     52     53     54     55     56     57     58     59     60     61     62     63     64     65     66     67     68     69     70     71     72     73     74     75     76     77     78     79     80     81     82     83     84     85     86     87     88     89     90     91     92     93  
Block malicious URL Requests on Wordpress
Published on : 08.05.2010 Category : PHP Snippets Viewed : 25 times.
[code] <?php/*Plugin Name: Block Bad QueriesPlugin URI: http://perishablepress.com/press/2009/12/22/protect-wordpress-against-malicious-url-requests/...
Read More »

Thesis 1.7b1 bug
Published on : 08.05.2010 Category : PHP Snippets Viewed : 32 times.
[code] // How it is in 1.7b1 - Breaks the custom body filter if (is_array($classes)...
Read More »

If a 'bin' exists in the user home, then add that to the PATH.
Published on : 08.05.2010 Category : PHP Snippets Viewed : 25 times.
Put this line in your .bashrc. If the user has a directory named 'bin' then that will be added to the PATH. All scripts in that path (wich are executable) will be available as commands to that user. [code] # enable bin diretory in PATH when foundif [ -...
Read More »

Drupal example on how to use form alter hook
Published on : 08.05.2010 Category : PHP Snippets Viewed : 34 times.
Resizing fields using a custom module You could also resize the field using a custom module. For example, if you created mysite.module, you could use something like this to reduce the field size to 30 characters [code] function mysite_form_alter(&$form...
Read More »

Open office leerzeichen in Zeilenumbrüchen wandeln
Published on : 08.05.2010 Category : PHP Snippets Viewed : 29 times.
suche nach Leerzeichen im Wortsinn ersetzen durch "&zeichen(10)&" ohne die Option [ ]regulärer Ausdruck Suche nach ^.*$ ersetzen durch ="&" mit der Option [x]regulärer Ausdruck Dadurch werden die Texte in Formeln gewandelt mit Umbrüchen statt Leerzeichen. [code] ...
Read More »

Theme registry rebuild
Published on : 08.05.2010 Category : PHP Snippets Viewed : 27 times.
[code]in template.php, insert the following function drupal_rebuild_theme_registry();[/code]...
Read More »

.htaccess file to access page without .php exstension
Published on : 08.05.2010 Category : PHP Snippets Viewed : 26 times.
[code] RewriteEngine OnRewriteBase /RewriteRule ^()$ index.php [NC,L]Rewritecond ...
Read More »

Remove style tags from Drupal node
Published on : 08.05.2010 Category : PHP Snippets Viewed : 46 times.
[code] <?php $results = db_query("SELECT DISTINCT nid from node_revisions WHERE body REGEXP '<style>.*</style>' OR body REGEXP '<style>.*</style>'"...
Read More »

Kohana System Configuration Hook
Published on : 08.05.2010 Category : PHP Snippets Viewed : 36 times.
Instead of having multiple configurations for multiple domains, and the numerous if/then/else statements not to mention the various locations for storing the configuration....instead, enable hooks in your application config and then add this snippet of code into your application hooks directory. [code] <?php ...
Read More »

Exclude Sticky Posts from the Loop in WordPress
Published on : 08.05.2010 Category : PHP Snippets Viewed : 46 times.
[code] <?phpquery_posts(array("post__not_in" =>get_option("sticky_posts")...
Read More »

 

 Members
Log In !
Email Address :

Password :


Change my passowrd !
Sign Up !
We have : 3 members.
Latest member : albans
 
 Last Posts
 
 Advertising
 
©PhpTips.im 2010
Powered by PikaCMS.
Quick Links :
Home | Browse all articles | Downloads | Terms of Use
RSS RSS 2.0 : Articles | Downloads ATOM : Articles | Downloads