Menu

PHP QuickText goodness

CodeNexus
2007-08-12
2012-11-13
  • CodeNexus

    CodeNexus - 2007-08-12

    Here is some PHP goodness for QuickText. Note that it has a mixture of PHP and HTML as well since I use it most often in this context. It should be able to be copy and pasted into the top of your QuickText.ini file. Let me know if it is useful and/or if there are any changes needed. I might also work on a CSS one if it is deemed necessary.

    [1]
    php=<?php\n$\n?>\n$
    if=if ($)\n{\n $\n}\n$
    ifelse=if ($)\n{\n $\n}\nelse\n{\n $\n}\n$
    elseif=elseif ($)\n {\n $\n }\n$
    while=while ($)\n {\n $\n }\n$
    do=do\n {\n $\n }\nwhile ($);\n$case=case $: $\n$
    default=default $: $\n$
    else=else\n{\n $\n}\n$
    elseif=else if ($)\n{\n $\n}\n$
    for=for ($;$;$)\n {\n $\n }\n$
    foreach=foreach ($ as $)\n {\n $\n }\n$
    func=function $($)\n{\n $\n return $;\n}\n$
    function=function $($)\n{\n $\n return $;\n}\n$
    inc=include ('$');\n$
    include=include ('$');\n$
    req=require ('$');\n$
    require=require ('$');\n$
    include_once=include_once ('$');\n$
    require_once=require_once ('$');\n$
    inc1=include_once ('$');\n$
    req1=require_once ('$');\n$
    switch=switch ($)\n {\n case $:\n $\n break;\n }\n$
    case=case $:\n $\n break;\n$
    comment=/*****\n $\n*****/\n$
    query=\$query = "$";\n\$result = mysql_query(\$query) or die ("Query failed: ".mysql_error());\n$
    black=#000000
    blue=#0000FF
    cyan=#00FFFF
    green=#00FF00
    grey=#C0C0C0
    mangenta=#FF00FF
    orange=#FF9900
    red=#FF0000
    white=#FFFFFF
    yellow=#FFFF00
    htmlcomment=<!-- $ -->\n$
    html=<html>\n <head>\n <title>$</title>\n $\n </head>\n <body>\n $\n </body>\n</html>\n$
    head=<head>\n $\n</head>\n$
    title=<title>$</title>\n$
    body=<body>\n $\n</body>\n$
    b=<b>$</b>$
    i=<i>$</i>$
    p=<p>$</p>\n$
    br=<br />\n$
    form=<form name="$" action="$">\n $\n</form>\n$
    h1=<h1>$</h1>\n$
    h2=<h2>$</h2>\n$
    h3=<h3>$</h3>\n$
    h4=<h4>$</h4>\n$
    h5=<h5>$</h5>\n$
    h6=<h6>$</h6>\n$
    img=<img src="$" alt="$" />\n$
    input=<input type="$" name="$" />\n$
    li=<li>$</li>\n$
    link=<a href="$">$</a>$
    ol=<ol>\n <li>$</li>\n $\n</ol>\n$
    pre=<pre>$</pre>\n$
    span=<span>$</span>$
    table=<table>\n <tr>\n <td>$</td>\n $\n </tr>\n $\n</table>\n$
    td=<td>$</td>\n$
    tr=<tr>\n $\n</tr>\n$
    ul=<ul>\n <li>$</li>\n $\n</ul>\n$

     
    • CodeNexus

      CodeNexus - 2007-08-14

      Wow that really didn't paste in well.  Lines jumbled and tabs seem to have been stripped from the above.  Yuk!

      I'll look at hosting my QuickText.ini file somewhere soon.  Will let everyone know when I have it up.

      I have made some small improvements to it since this post as well.