Example 1
#contact #center_column p {margin:0; padding:0 0 10px 0;} #contact fieldset p {padding-left: 60px;} /* correct drop down placement */
Even thought the padding-left is after, the first line take presidence because it is further down the element chain. so line 1 will apply.
Example 2
#contact #center_column p {margin:0; padding:0 0 10px 0;} #contact #center_column fieldset p {padding-left: 60px;} /* correct drop down placement */
In this example line 2 will be applied because the are at the same element level, but then line 2 is after line 1 so is applied as you normally expect css to work.
Full Syntax
{nicepaypal:button type|amount|item name|item number|shipping|shipping2|tax|item quantity|weight|option1|option2}
Real World Examples
{nicepaypal:cart|79.99|Custom Teeth Whitening Trays|||||field;Enter Quantity;1;3||} <p>{nicepaypal:cart|79.99|Custom Teeth Whitening Trays|||||field;<strong>Enter Quantity</strong>;1;}</p>
To prevent version of Joomla being identified. A way to check if you're running a Joomla site and what version by what files and directories are present. Also will prevent Blind Elephant working. One of the easiest ways for an attacker to decide if your site is a potential Joomla! target is to perform a rudimentary visual fingerprinting.
Template Issues, Deny these links via htaccess
* You should also remove (if not needed) the default joomla images. Presence of Certain default files and folders can ID the Joomla Version. Delete the following:
Directories:
Files:
Other Fingerprinting
Error Reporting to None
Prevents any minor glitch to reveal sensitive server configuration information to a potential hacker). If this doesn't work, disabling PHP's error output to the browser in the php.ini. Leaving Error Reporting set to anything else except NONE will slow down your website and give hackers a security hole that they can use to peer into your server settings and PHP environment. Turn it off (NONE) unless you are debugging at the moment. Only use Error Reporting while testing or debugging. Otherwise keep it turned off.
robots.txt is a security nightmare.
- create deny lists for certain folders. better than identifying them in robots.txt
- Think twice about what you put in your robots.txt, since this is a common source for attackers to find interesting URLs
- ideally - make everything dissallowed and then add exceptions. this will not show what folders are there
if suhosin patch is installed this can cause unxplained issues where stuff will not run. it cannot be disabled by users but can be put in simulation mode (same thing)
find extension="suhosin.so" and add the following line below to give
extension="suhosin.so"
suhosin.simulation="On"
This useful article shows you what parts of a URL you can build with .htaccess server environmental variables.
Below I have named the various parts of a URL and given the corresponding global PHP variable. This is not an exahstive list as you can get usrrname passwords from a URL
https://user123:password1@video.quantumwarp.com:8080/subfolder/subfolder2/index.php?turnip=51&alien=54#myniceheading 1 2 3 4 5 6 7 8 9 10 ## PHP Variables ## $_SERVER['SERVER_PROTOCOL'] 1-2 (:// is not included) $_SERVER['HTTPS']; (This is a Boolean) $_SERVER['PHP_AUTH_USER'] 2-3 $_SERVER['PHP_AUTH_PW'] 3-4 (: and @ are not included) $_SERVER['SCRIPT_NAME']; 4-8 $_SERVER['PHP_SELF']; 4-8 $_SERVER['HTTP_HOST']; 4-6 $_SERVER['SERVER_NAME']; 4-6 $_SERVER['SERVER_PORT']; 6-7 (: is not included) $_SERVER['REQUEST_URI']; 7-10 (fragment might not be included) $_SERVER['QUERY_STRING']; 8-9 (? is not included) ## Part Names ## Protocol 1-2 Username 2-3 Password 3-4 Sub Domain 4-5 Domain 5-6 Port 6-7 Path 7-8 Query 8-9 Fragment 9-10 (some might refer to this as an Anchor)
To change the database prefix to prevent SQL Injection Attack (if not done during install)
Backup your database and site first.
Newer version of PHPMyAdmin have a table prefix changer inbuilt and is now the prefered method.
Taken from here
This table quickly converts times into seconds for the use in htaccess rules.
#-------------------------------------------
# TIME CHEAT SHEET 2
#-------------------------------------------
# 300 5 MIN
# 600 10 MIN
# 900 15 MIN
# 1800 30 MIN
# 2700 45 MIN
#
# 3600 1 HR
# 7200 2 HR
# 10800 3 HR
# 14400 4 HR
# 18000 5 HR
# 36000 10 HR
# 39600 11 HR
# 43200 12 HR
# 46800 13 HR
# 50400 14 HR
# 54000 15 HR
# 86400 24 HR
#
# 86400 1 DAY
# 172800 2 DAY
# 259200 3 DAY
# 345600 4 DAY
# 432000 5 DAY
# 518400 6 DAY
# 604800 7 DAY
#
# 604800 1 WEEK
# 1209600 2 WEEK
# 1814400 3 WEEK
# 2419200 4 WEEK
#
# 2419200 1 MONTH
# 4838400 2 MONTH
# 7257600 3 MONTH
# 9676800 4 MONTH
# 12096000 5 MONTH
# 14515200 6 MONTH
# 16934400 7 MONTH
# 19353600 8 MONTH
# 21772800 9 MONTH
# 24192000 10 MONTH
# 26611200 11 MONTH
# 29030400 12 MONTH
google prefers expires and set to 1 month
look at apache redirect and double slash section and make run quicker ie expressions ?*+
(.*) is really hungry
see - http://www.joomlaperformance.com/articles/performance/so_you_want_to_speed_up_joomla_3_14.html
- joomla and jot cache do not store headers
Notes
when stuff doesnt work try this
These are the headers that are set for the aggregated file:
Cache
HTML Output
Other
dont gzip jpg and png because it makes them bigger ? (check this)
Which Parameters are Important?
PHP Compression
compressing a websites output makes the delivery of the content to the browser quicker.
Basically most images, css, javascript, and other files can be optimized for faster download by telling your site visitors to cache them for a certain period of time. The default behaviour is to check the last-modified and/or the Etag headers of the file EVERY time it is requested.
So a user goes to /home/index.html, and the browser caches all the images and files. Then the user leaves the site and comes back later, and the browser has to send If-Modified-Since conditional GET requests for every cached item, basically to see if the file has been changed and if they should update their cache.
Dynamic content cannot be cached via htaccess, ie joomla unless you add the headers to the output via php
When files are then cached by your site visitors they do not send the If-Modified-Since until the set cache time has completed.
Once an item is cached it will remain cached until it expires or gets revalidated
The Expires and cache-control headers can’t be circumvented; unless the cache (either browser or proxy) runs out of room and has to delete the representations
the cached copy will be used until then which means less http requests
Expires/max-age are superior as they mean there's no need for a request. However, ETag/Last-Modified is still better than nothing.
less http requests
ETag and Last-Modified headers are on by default
BE WARNED. Do not set to long a expire time
YSlow has a minimum far future date - to be added here soon i think it is 1 week google is 1 month and wants expires
Cache-Control : max-age = [delta-seconds]
Modifies the expiration mechanism, overriding the Expires header. Max-age implies Cache-Control : public.
Cache-Control : public
Indicates that the object may be stored in a cache. This is the default.
Cache-Control : private
Cache-Control : private = [field-name]
Indicates that the object (or specified field) must not be stored in a shared cache and is intended for a single user. It may be stored in a private cache (ie browser cache).
Cache-Control : no-cache
Cache-Control : no-cache = [field-name]
Indicates that the object (or specified field) may be cached, but may not be served to a client unless revalidated with the origin server.
Cache-Control : no-store
Indicates that the item must not be stored in nonvolatile storage, and should be removed as soon as possible from volatile storage.
Cache-Control : no-transform
Proxies may convert data from one storage system to another. This directive indicates that (most of) the response must not be transformed. (The RFC allows for transformation of some fields, even with this header present.)
Cache-Control : must-revalidate
Cache-Control : proxy-revalidate
Forces the proxy to revalidate the page even if the client will accept a stale response. Read the RFC before using these headers, there are restrictions on their use.
Caveats
Notes
"max-age" value indicates the time difference (in seconds) after which the content will be expired and reloaded from the server
"public" keyword presence indicates that any system along the route may cache the response
"must-revalidate" indicates caching systems to obey other header information you may provide at a later time about the cache. This should help preventing stale caching (that is, caching that delivers content that is outdated).
by eliminating the Last-Modified and ETags headers, you are eliminating validation requests, leading to a decreased response time. This should work fine in most cases when dealing with static, rarely updated content.
Example 1
http://tutorialpedia.org/tutorials/Apache+enable+file+caching+with+htaccess.html
Example 2
http://linuxdevcenter.com/pub/a/linux/2002/02/28/cachefriendly.html?page=2
The reason I remove and disable the ETag is because supposedly some browsers will ignore your Expires header when it’s present:
The reason I remove the Last-Modified header is for the same reason:
The reason I set the Cache-Control header to ‘public’ is so the browser will cache media over HTTPS (see tip #3):
The reason I set the Cache-Control header to ‘no-transform’ is to prevent proxies from modifying my content.
Vary: Accept-Encoding response header. This instructs the proxies to cache two versions of the resource: one compressed, and one uncompressed.
Example
Header unset Server
Header unset Last-Modified
Header unset Date
Header unset Accept-Ranges
Header unset Content-Length
Header unset Keep-Alive
Header unset Connection
Header unset Content-Type
Header unset Cache-Control
Header unset Expires
Header unset Pragma:
When I uncomment my changes, then I get the full header:
HTTP/1.x 200 OK
Date: Wed, 17 Sep 2008 19:37:42 GMT
Server: Apache
Last-Modified: Wed, 17 Sep 2008 15:30:07 GMT
Accept-Ranges: bytes
Content-Length: 58
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
The Last-Modified header allows validation based on the component's timestamp
Removing this reduces HTTP requests and disables this type of cache header
The most common validator is the time that the document last changed, as communicated in
Last-Modified header. When a cache has an representation stored that includes a Last-Modified header,
it can use it to ask the server if the representation has changed since the last time it was seen, with an If-Modified-Since request.
if this header is present the browser checks back to the server that is has not been changed and then it uses the cached version
Aet in menu
Article options
Other notes
Standalone Applications must have their own folder, use all lowercase.
Via ftp, create a folder ../sp/
All standalone applications must have their own nested folder ../sp/othercms/
Add a .htaccess folder to ../sp/ to deny access to the folder and sub folders (or appropiate - check)
Editing
JCE Suggestions to send
Joomlashine suggestions to send
Gallery Notes
how to rip a website page courtesy of customers
Front end editing related
Joomla Module ACL suggestions
Send this to that guy who did the module acl
the folders structures is as follows
the rest of the files are template specific for obvious reasons
nb the default theme images are in the image directory, so the themes as mentioned are probably overides
- the real base theme is located in the T3 system plugin
....htdocs\plugins\system\jat3\base-themes\
you put the files in the same folder in the theme directory and it overides it
priority for template files
T3 system plugin --> blank template core files --> custom created template files
a useful overview + block overide
http://www.joomlart.com/forums/showthread.php?48230-Why-so-complex...-and-can-I-override-the-skeleton-of-the-layout&s=3b031bce7ea95b7fefa1c893c42f712d
http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Guides
http://wiki.joomlart.com/wiki/JA_Template_Framework/Guides
http://wiki.joomlart.com/wiki/JA_Template_Framework/FAQs
nb block overides per template (not sure how you would overide rtl (maybe this is done by the plugin)
to view stuff
/?t3info=1&allblocks=1&content=0
this loads all the modules
D:\Documents\websites\joomla\htdocs\plugins\system\jat3\base-themes\default\page\default.php (default) or one of the others if specified
nb footer is a module posistion
to create a new module posistion - easy instruictions
http://www.joomlart.com/forums/showthread.php?45746-Creating-new-module-positions-in-T3
these files open for developing
D:\Documents\websites\joomla\htdocs\templates\ja_t3_blank\page\default.php (main layout)
D:\Documents\websites\joomla\htdocs\templates\ja_t3_blank\css\template.css (default blank template css) NB i copied this to the blank template first before editing
D:\Documents\websites\joomla\htdocs\plugins\system\jat3\base-themes\default\css\template.css (main default css in system plugin default base theme)
D:\Documents\websites\joomla\htdocs\templates\ja_t3_blank\local\themes\lancastrian\css\template.css (my custom theme css)
nb - check for overidedes backwards. ie check lacastrian it css, then the blank template css and then the system plugin default css
header gets added here
<a name="Top" id="Top">
see lD:\Documents\websites\joomla\htdocs\templates\ja_t3_blank\core\etc\layouts\default.xml it is defined in there
overides
these only work on specific atrribvutes of a thing, not the whole decleration.