This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfif structkeyexists(evaluate(arguments.objectname), "featuredimage")> | |
<img src="#_getImagePath(src=evaluate(arguments.objectname).featuredimage)#"> | |
</cfif> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN" | |
"http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd"> | |
<urlrewrite> | |
<rule> | |
<note> | |
Allow TomCat to have SES links. | |
</note> | |
<!-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignore Misc Folder | |
miscellaneous | |
# unpacked plugin folders | |
plugins/**/* | |
# files directory where uploads go | |
files | |
# DBMigrate plugin: generated SQL | |
db/sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- The Gridmanager canvas --> | |
<div id="mycanvas" class="clearfix"></div> | |
<!-- The Form--> | |
<form method="post" action="saveme" id="gridmanager-save"> | |
<!-- hidden Field--> | |
<input type="hidden" name="mycontent" id="mycontent" /> | |
<input type="submit" name="submit" class="submit" /> | |
</form> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent extends="controller"> | |
<cffunction name="init"> | |
<cfscript> | |
provides("html,json"); | |
filters(through="_isValidAjaxRequest", except="index"); | |
</cfscript> | |
</cffunction> | |
<!--- This is called remotely; | |
isAjax() just confirms this is an ajax request; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfoutput> | |
#expandPath(".")#<br /> <!--- for me outputs D:\websites\www.scribble.local\junk ---> | |
#expandPath("/")#<br /> <!--- for me outputs d:\websites\www.scribble.local\. Note the difference in capitalisation of the drive letter ---> | |
</cfoutput> | |
On Apache/Cfwheels/CF10: | |
/Volumes/Documents/www/foo/html | |
/Applications/ColdFusion10/cfusion/bin/redirect:/rewrite.cfm/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<--- edit.cfm // NB, boostrapDateSelect() is using that bootstrap plugin I did---> | |
<cfparam name="Signpost"> | |
<cfparam name="allCategories"> | |
<cfoutput> | |
<cfif params.action EQ "edit"> | |
<h1>Edit Signpost</h1> | |
<p>#linkTo(text="View Signpost", route="Signposts", action="view", key=Signpost.key(), class="btn btn-primary")#</p> | |
#startFormTag(action="update", route='admin', controller='Signposts')# #hiddenField(objectname="Signpost", property="id")# | |
<cfelse> | |
<h1>Add New Signpost</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This gets the latest posts from your PHPBB3 install and outputs them as a UL; results are limited to forum.id's 1,2 and 3 in this example; | |
$connection = mysql_connect(localhost,"YOURDATABASEUSER","YOURDATABASEPW") or die("Service Currently Unavailable"); | |
$db = mysql_select_db("YOURPHPBB3DATABASENAME",$connection) or die("Service Currently Unavailable"); | |
$sql = "SELECT `phpbb_topics`.`forum_id`, `phpbb_topics`.`topic_id`, `phpbb_topics`.`topic_title`, `phpbb_forums`.`forum_id`, `phpbb_forums`.`forum_name`,`phpbb_forums`.`parent_id` FROM `phpbb_topics` | |
Inner Join `phpbb_forums` ON `phpbb_forums`.`forum_id` = `phpbb_topics`.`forum_id` WHERE `phpbb_forums`.`parent_id` = 1 OR `phpbb_forums`.`parent_id` = 2 OR `phpbb_forums`.`parent_id` = 2 | |
order by topic_last_post_time desc limit 0,10"; | |
$result = mysql_query($sql) or die("Service Currently Unavailable"); | |
echo "<ul>"; | |
for($x=1;$x<=10;$x++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<--------Main.cfc-----------> | |
<cffunction name="init"> | |
<cfscript> | |
// AD Auth, application wide: if I wanted to only restrict a subset a pages, I could use 'only' instead of except below. | |
// This filter call should be in every controller you wish to protect | |
filters(through="loginRequired", except="login,dologin"); | |
// Login | |
verifies(only="dologin", post=true, params="username,password", error="Both username and password are required", handler="login"); | |
</cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#truncate( | |
text=stripTags(body), | |
length=300, | |
truncateString="#linkTo( | |
text='... Read More »', | |
route='blog', | |
action='view', | |
key=id)#" | |
)# |