Temperature: 84°F (29°C)
Feels Like: 88°F (31°C)
Heat Index: 85°F (29°C)
Dew Point: 64°F (18°C)
Humidity: 51.5%
Barometer: 30.09 in. Hg (1019 hPa)
Sky Conditions: clear below 12,000 ft
Conditions: clear
Wind: from the SE at 8 mph
Visibility: 10 mi ( 16.1 km)
Last Updated: 08/20/2008 2:53 pm
Question: How can I determine my server’s time?
Answer: One way of doing this is to put the following code in a template with PHP parsed on input:
<?php print date("F d, Y H:i:s T", time())?>
HowTo Articles • Note to Self •
Question: What are the differences in the Forum Module between
New Topics Search
Active Topics Search
Pending Posts
Answer: New Topics search: These are the topics created since your “last visit”, and it ignores any that you have read
Active Topics search: Same as above, except instead of since your last visit, also limits to the past 12 hours
Pending Posts: Topics in the past month without any replies.
Topics that you make yourself are automatically marked as read, as you are sent to your topic immediately after posting.
Modules •Question: How can I create a single entry page for my search results page?
Answer: A single entry page for your search results can be created by using the following code snippet:
{exp:weblog:entries limit="1"}
Whatever you want inside here
{/exp:weblog:entries}
This snippet can be put into whatever design you’d use.
Now that we have the basic components of the single entry template, I’d suggest making the following modifications:
{exp:weblog:entries weblog="yourweblogname" limit="1"
disable="categories|member_data|pagination|trackbacks" }
Whatever you want inside here
{/exp:weblog:entries}
NOTE: If you are displaying categories or member information in your template, don’t disable categories or member_data.
This is a sample .htaccess file I use on some of my sites.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
SecFilterEngine Off
The last item may not be needed for many sites, but for my server I need it.
Note to Self •Question: Where can I find the Subsegment Plugin?
Answer: See this thread.
Question: Where can I find the Search Marker Plugin?
Answer: Location: Search Marker Plugin
Question: How can I find my full server path?
Answer: See this EEKB article:
EEKB: What is a Full Server Path?
EEDocs • Note to Self •For my own use: ISAPI_REWRITE
Note to Self • Windows Servers •Question: How can I automate creating categories using a .csv file?
Answer: You can add categories in a relatively automatic fashion using some custom code.
NOTE: This code is very rudimentary. There is no built in error checking. Proceed at your own risk.
<?php
global $DB, $REGX;
/* Set variables */
$site_id = 1;
$group_id = 4;
$parent_id = 5;
$table1 = "exp_categories";
$table2 = "exp_category_field_data";
$row = 1;
$handle = fopen("http://www.example.com/edit/states.txt", "r");
while (($data = fgetcsv($handle, 1000, "\t")) !== FALSE) {
echo "Title: $data[0]<br />\n";
$url_title = $REGX->create_url_title($data[0]);
$description = $data[0];
echo "URL Title: $url_title<br />\n";
echo "Description: $description<br />\n";
$data1 = array(
'site_id' => $site_id,
'group_id' => $group_id,
'parent_id' => $parent_id,
'cat_name' => $data[0],
'cat_url_title' => $url_title,
'cat_description' => $description);
$DB->query($DB->insert_string($table1, $data1));
$cat_id = $DB->insert_id;
echo "cat_id: $cat_id<br />\n";
$data2 = array (
'cat_id' => $cat_id,
'group_id' => $group_id
);
$DB->query($DB->insert_string($table2, $data2));
$row++;
}
fclose($handle);
?>
HowTo Articles • Note to Self •
© 2008 Legal and Copyright Information