Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated RewriteRules for hosting in sub-directory. Updated form actio…

…n urls in templates to add slash to end of urls.
  • Loading branch information...
commit 674071f2feb7e42912ee8c914a2c5e3e990aa4e9 1 parent 3aa15c2
@snytkine authored
View
26 RewriteRules.txt
@@ -1,4 +1,5 @@
# Rewrite Rules for Lampcms
+# These rewrite rules are for hosting Lampcms in root directory of the site
# place in httpd.conf inside virtual host container for your site
# or add to .htaccess of your site
#
@@ -12,3 +13,28 @@
RewriteEngine on
RewriteCond $1 !^(index\.php|(.+)\.(css|js|png|gif|jpg|jpeg)$|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
+
+
+######### RULES FOR HOSTING LAMPCMS in SUB DIRECTORY (not in site's root) ################
+#
+# Option 1 - without using .htaccess:
+# Place this in the <Directory/> Container that points to full path of sub-directory
+# Example: (this is on Windows, on Linux just use Unix style full path)
+# Notice - NO slash in front of index.php redirect!
+# Of cause you must uncomment the 5 lines below
+# <Directory C:\wamp\sites\LampCMS\forum>
+# RewriteEngine on
+# RewriteCond $1 !^(index\.php|(.+)\.(css|js|png|gif|jpg|jpeg|txt))
+# RewriteRule ^(.*)$ index.php/$1
+# </Directory>
+#
+#######################################################################
+# Option 2: If .htaccess is enabled for your sub-directory
+# Then place these lines in the .htaccess file
+# in the directory where Lampcms going to be installed:
+# (of cause uncomment the lines first)
+#
+# RewriteEngine on
+# RewriteCond $1 !^(index\.php|(.+)\.(css|js|png|gif|jpg|jpeg|txt))
+# RewriteRule ^(.*)$ index.php/$1
+#
View
32 lib/Lampcms/Controllers/Connectblogger.php
@@ -118,7 +118,7 @@ class Connectblogger extends WebPage
protected $aBlogs;
- protected $callback = '/index.php?a=connectblogger';
+ protected $callback = '{_WEB_ROOT_}/{_connectblogger_}';
/**
* The main purpose of this class is to
@@ -145,7 +145,7 @@ protected function main()
d('$this->callback: ' . $this->callback);
if (!extension_loaded('oauth')) {
- throw new \Exception('Unable to use Blogger API because OAuth extension is not available');
+ throw new \Exception('@@Unable to use Blogger API because OAuth extension is not available@@');
}
$this->aConfig = $this->Registry->Ini['BLOGGER'];
@@ -156,7 +156,7 @@ protected function main()
} catch (\OAuthException $e) {
e('OAuthException: ' . $e->getMessage());
- throw new \Exception('Something went wrong during authorization. Please try again later' . $e->getMessage());
+ throw new \Exception('@@Something went wrong during authorization. Please try again later@@' . $e->getMessage());
}
@@ -202,7 +202,7 @@ protected function selectBlog()
d('$a: ' . print_r($a, 1));
if (empty($a)) {
- throw new \Exception('No blogs found for this user');
+ throw new \Exception('@@No blogs found for this user@@');
}
$selectedID = (int)substr($this->Request->get('blog'), 4);
@@ -245,10 +245,9 @@ protected function selectBlog()
* Generate oAuth request token
* and redirect to Blogger for authentication
*
- * @return object $this
- *
- * @throws Exception in case something goes wrong during
+ * @throws \Exception in case something goes wrong during
* this stage
+ * @return \Lampcms\Controllers\object $this
*/
protected function step1()
{
@@ -268,12 +267,12 @@ protected function step1()
* so that it will be caught ONLY by the index.php and formatted
* on a clean page, without any template
*/
- throw new \Exception("Failed fetching request token, response was: " . $this->oAuth->getLastResponse());
+ throw new \Exception("@@Failed fetching request token, response was@@: " . $this->oAuth->getLastResponse());
}
} catch (\OAuthException $e) {
e('OAuthException: ' . $e->getMessage() . ' ' . print_r($e, 1));
- throw new \Exception('Something went wrong during authorization. Please try again later' . $e->getMessage());
+ throw new \Exception('@@Something went wrong during authorization. Please try again later@@' . $e->getMessage());
}
return $this;
@@ -284,9 +283,10 @@ protected function step1()
* Step 2 in oAuth process
* this is when Blogger redirected the user back
* to our callback url, which calls this controller
- * @return object $this
*
- * @throws Exception in case something goes wrong with oAuth class
+ * @throws \OutOfBoundsException
+ * @throws \Exception in case something goes wrong with oAuth class
+ * @return \Lampcms\Controllers\object $this
*/
protected function step2()
{
@@ -369,7 +369,7 @@ protected function step2()
*/
e('OAuthException: ' . $e->getMessage() . ' in file ' . $e->getFile() . ' on line: ' . $e->getLine() . ' Debug: ' . print_r($aDebug, 1));
- $err = 'Something went wrong during authorization. Please try again later. ' . $e->getMessage();
+ $err = '@@Something went wrong during authorization. Please try again later@@. ' . $e->getMessage();
throw new \Exception($err);
}
@@ -398,12 +398,12 @@ protected function makeBlogSelectionForm()
/**
* @todo Translate string
*/
- $save = 'Save';
+ $save = '@@Save@@';
$token = \Lampcms\Forms\Form::generateToken();
$options = '';
$tpl = '<option value="blog%s">%s</option>';
foreach ($this->aBlogs as $id => $blog) {
- $options .= sprintf($tpl, $id, $blog['title']);
+ $options .= \sprintf($tpl, $id, $blog['title']);
}
$vars = array(
@@ -473,7 +473,7 @@ protected function closeWindow()
$s = Responder::PAGE_OPEN . Responder::JS_OPEN .
$script .
Responder::JS_CLOSE .
- '<h2>You have successfully connected your Blogger Blog. You should close this window now</h2>' .
+ '<h2>@@You have successfully connected your Blogger Blog. You should close this window now@@</h2>' .
Responder::PAGE_CLOSE;
d('cp s: ' . $s);
@@ -509,7 +509,7 @@ protected function getUserBlogs()
*/
d('debug: ' . print_r($aDebug, 1));
if (empty($res) || empty($aDebug['http_code']) || '200' != $aDebug['http_code']) {
- $err = 'Unexpected Error parsing API response';
+ $err = '@@Unexpected Error parsing API response@@';
throw new \Exception($err);
}
View
35 lib/Lampcms/Controllers/Logintumblr.php
@@ -139,7 +139,7 @@ protected function main()
{
if (!extension_loaded('oauth')) {
- throw new \Exception('Unable to use Tumblr API because OAuth extension is not available');
+ throw new \Exception('@@Unable to use Tumblr API because OAuth extension is not available@@');
}
$this->aTm = $this->Registry->Ini['TUMBLR'];
@@ -150,7 +150,7 @@ protected function main()
} catch (\OAuthException $e) {
e('OAuthException: ' . $e->getMessage());
- throw new \Exception('Something went wrong during authorization. Please try again later' . $e->getMessage());
+ throw new \Exception('@@Something went wrong during authorization. Please try again later@@' . $e->getMessage());
}
@@ -177,10 +177,9 @@ protected function main()
* Generate oAuth request token
* and redirect to tumblr for authentication
*
- * @return object $this
- *
- * @throws Exception in case something goes wrong during
+ * @throws \Exception in case something goes wrong during
* this stage
+ * @return \Lampcms\Controllers\object $this
*/
protected function step1()
{
@@ -207,12 +206,12 @@ protected function step1()
* on a clean page, without any template
*/
- throw new \Exception("Failed fetching request token, response was: " . $this->oAuth->getLastResponse());
+ throw new \Exception("@@Failed fetching request token, response was@@: " . $this->oAuth->getLastResponse());
}
} catch (\OAuthException $e) {
e('OAuthException: ' . $e->getMessage() . ' ' . print_r($e, 1));
- throw new \Exception('Something went wrong during authorization. Please try again later' . $e->getMessage());
+ throw new \Exception('@@Something went wrong during authorization. Please try again later@@' . $e->getMessage());
}
return $this;
@@ -223,9 +222,9 @@ protected function step1()
* Step 2 in oAuth process
* this is when tumblr redirected the user back
* to our callback url, which calls this controller
- * @return object $this
*
- * @throws Exception in case something goes wrong with oAuth class
+ * @throws \Exception in case something goes wrong with oAuth class
+ * @return \Lampcms\Controllers\object $this
*/
protected function step2()
{
@@ -293,7 +292,7 @@ protected function step2()
} catch (\OAuthException $e) {
e('OAuthException: ' . $e->getMessage() . ' ' . print_r($e, 1));
- $err = 'Something went wrong during authorization. Please try again later' . $e->getMessage();
+ $err = '@@Something went wrong during authorization. Please try again later@@' . $e->getMessage();
throw new \Exception($err);
}
@@ -358,7 +357,7 @@ protected function getUserBlogs()
d('debug: ' . print_r($aDebug, 1));
if (empty($res) || empty($aDebug['http_code']) || '200' != $aDebug['http_code']) {
- $err = 'Unexpected Error parsing API response';
+ $err = '@@Unexpected Error parsing API response@@';
throw new \Exception($err);
}
@@ -375,7 +374,7 @@ protected function getUserBlogs()
*/
$XML = new \DOMDocument('1.0', 'utf-8');
if (false === $XML->loadXML($res)) {
- $err = 'Unexpected Error parsing response XML';
+ $err = '@@Unexpected Error parsing response XML@@';
throw new \Exception($err);
}
@@ -385,7 +384,7 @@ protected function getUserBlogs()
if (0 === $aParsed->length) {
e('Looks like user does not have any blogs: $xml: ' . $res);
- $err = ('Looks like you have Tumblr account but do not have any blogs on Tumblr');
+ $err = ('@@Looks like you have Tumblr account but do not have any blogs on Tumblr@@');
throw new \Exception($err);
}
@@ -443,7 +442,9 @@ protected function connect()
/**
* Return html that contains JS window.close code and nothing else
*
- * @return unknown_type
+ * @param array $a
+ *
+ * @return void
*/
protected function closeWindow(array $a = array())
{
@@ -458,7 +459,7 @@ protected function closeWindow(array $a = array())
%s
setTimeout(myclose, 100); // give opener window time to process login and cancell intervals
}else{
- alert("This is not a popup window or opener window gone away");
+ alert("@@This is not a popup window or opener window gone away@@");
}';
d('cp');
@@ -467,7 +468,7 @@ protected function closeWindow(array $a = array())
$s = Responder::PAGE_OPEN . Responder::JS_OPEN .
$script .
Responder::JS_CLOSE .
- '<h2>You have successfully connected your Tumblr Blog. You should close this window now</h2>' .
+ '<h2>@@You have successfully connected your Tumblr Blog. You should close this window now@@</h2>' .
Responder::PAGE_CLOSE;
d('cp s: ' . $s);
@@ -511,7 +512,7 @@ protected function redirectToTumblr($url)
setTimeout(myredirect, 300);
' .
Responder::JS_CLOSE .
- '<div class="centered"><a href="' . $url . '">If you are not redirected in 2 seconds, click here to authenticate with tumblr</a></div>' .
+ '<div class="centered"><a href="' . $url . '">@@If you are not redirected in 2 seconds, click here to authenticate with tumblr@@</a></div>' .
Responder::PAGE_CLOSE;
d('exiting with this $s: ' . $s);
View
67 lib/Lampcms/Controllers/Logintwitter.php
@@ -153,7 +153,7 @@ protected function main()
{
if (!extension_loaded('oauth')) {
- throw new \Lampcms\Exception('Unable to use Twitter API because OAuth extension is not available');
+ throw new \Lampcms\Exception('@@Unable to use Twitter API because OAuth extension is not available@@');
}
/**
@@ -180,7 +180,7 @@ protected function main()
} catch (\OAuthException $e) {
e('OAuthException: ' . $e->getMessage());
- throw new \Lampcms\Exception('Something went wrong during authorization. Please try again later' . $e->getMessage());
+ throw new \Lampcms\Exception('@@Something went wrong during authorization. Please try again later@@' . $e->getMessage());
}
/**
@@ -200,10 +200,10 @@ protected function main()
* Generate oAuth request token
* and redirect to twitter for authentication
*
- * @return object $this
- *
- * @throws Exception in case something goes wrong during
+ * @throws Exception
+ * @throws \Exception in case something goes wrong during
* this stage
+ * @return \Lampcms\Controllers\object $this
*/
protected function startOauthDance()
{
@@ -230,15 +230,14 @@ protected function startOauthDance()
* on a clean page, without any template
*/
- throw new Exception("Failed fetching request token, response was: " . $this->oAuth->getLastResponse());
+ throw new \Exception("@@Failed fetching request token, response was@@: " . $this->oAuth->getLastResponse());
}
} catch (\OAuthException $e) {
e('OAuthException: ' . $e->getMessage() . ' ' . print_r($e, 1));
- throw new \Exception('Something went wrong during authorization. Please try again later' . $e->getMessage());
+ throw new \Exception('@@Something went wrong during authorization. Please try again later@@' . $e->getMessage());
}
-
return $this;
}
@@ -282,7 +281,7 @@ protected function finishOauthDance()
* there is a slight possibility that
* we don't get the oData back like if
* request for verify_credentials with token/secret fails
- * This should not happend because user has just authorized us - this
+ * This should not happen because user has just authorized us - this
* is a callback url after all.
* But still, what if... what if Twitter hickups and does not
* return valid response, then what should be do?
@@ -312,8 +311,8 @@ protected function finishOauthDance()
$aDebug = $this->oAuth->getLastResponseInfo();
d('debug: ' . print_r($aDebug, 1));
- $this->aUserData = array_merge($this->aUserData, $aAccessToken);
- d('$this->aUserData ' . print_r($this->aUserData, 1));
+ $this->aUserData = \array_merge($this->aUserData, $aAccessToken);
+ d('$this->aUserData ' . \print_r($this->aUserData, 1));
$this->aUserData['_id'] = (!empty($this->aUserData['id_str'])) ? $this->aUserData['id_str'] : (string)$this->aUserData['id'];
unset($this->aUserData['user_id']);
@@ -337,7 +336,6 @@ protected function finishOauthDance()
} catch (\OAuthException $e) {
e('OAuthException: ' . $e->getMessage() . ' ' . print_r($e, 1));
- // throw new \Lampcms\Exception('Something went wrong during authorization. Please try again later'.$e->getMessage());
/*
/**
* Cannot throw exception because then it would be
@@ -346,7 +344,7 @@ protected function finishOauthDance()
* for showing twitter oauth page and we don't need
* a login form or any other elements of regular page there
*/
- $err = 'Something went wrong during authorization. Please try again later' . $e->getMessage();
+ $err = '@@Something went wrong during authorization. Please try again later@@' . $e->getMessage();
exit(\Lampcms\Responder::makeErrorPage($err));
}
@@ -364,14 +362,15 @@ protected function finishOauthDance()
* a new user, otherwise update record
*
* @todo special case if this is 'connect' type of action
- * where existing logged in user is adding twitter to his account
- * then we should delegate to connect() method which
- * does different things - adds twitter data to $this->Registry->Viewer
- * but also first checks if another user already has
- * this twitter account in which case must show error - cannot
- * use same Twitter account by different users
+ * where existing logged in user is adding twitter to his account
+ * then we should delegate to connect() method which
+ * does different things - adds twitter data to $this->Registry->Viewer
+ * but also first checks if another user already has
+ * this twitter account in which case must show error - cannot
+ * use same Twitter account by different users
*
- * @return object $this
+ * @throws \Exception
+ * @return \Lampcms\Controllers\object $this
*/
protected function createOrUpdate()
{
@@ -403,7 +402,7 @@ protected function createOrUpdate()
* re-throw as regular exception
* so that it can be caught and shown in popup window
*/
- e('Unable to process login: ' . $e->getMessage());
+ e('@@Unable to process login@@: ' . $e->getMessage());
throw new \Exception($e->getMessage());
}
@@ -420,6 +419,8 @@ protected function createOrUpdate()
/**
* Add Twitter credentials to existing user
*
+ * @param $tid
+ *
* @return $this
*/
protected function connect($tid)
@@ -507,7 +508,7 @@ protected function createNewUser()
/**
* This will mark this userobject is new user
* and will be persistent for the duration of this session ONLY
- * This way we can know it's a newsly registered user
+ * This way we can know it's a newly registered user
* and ask the user to provide email address but only
* during the same session
*/
@@ -520,8 +521,6 @@ protected function createNewUser()
$this->Registry->Dispatcher->post($this->User, 'onNewUser');
$this->Registry->Dispatcher->post($this->User, 'onNewTwitterUser');
- //exit(' new user: '.$this->User->isNewUser().' '.print_r($this->User->getArrayCopy(), 1));
-
return $this;
}
@@ -581,8 +580,6 @@ protected function updateUser($bUpdateAvatar = true)
protected function postTweetStatus()
{
- //return $this;
-
$sToFollow = $this->aTW['TWITTER_USERNAME'];
$follow = (!empty($sToFollow)) ? ' #follow @' . $sToFollow : '';
$siteName = $this->Registry->Ini->SITE_TITLE;
@@ -619,7 +616,7 @@ protected function postTweetStatus()
* Create a new record in USERS_TWITTER table
* or update an existing record
*
- * @param unknown_type $isUpdate
+ * @return \Lampcms\Controllers\Logintwitter
*/
protected function updateTwitterUserRecord()
{
@@ -631,7 +628,7 @@ protected function updateTwitterUserRecord()
/**
- * Get user objecty ty twitter id (tid)
+ * Get user object ty twitter id (tid)
*
* @param string $tid Twitter id
*
@@ -655,15 +652,17 @@ protected function getUserByTid($tid)
* code and nothing else
*
* @todo instead of just closing window
- * can show a small form with pre-populated
- * text to be posted to Twitter,
- * for example "I just joined SITE_NAME, awesome site
+ * can show a small form with pre-populated
+ * text to be posted to Twitter,
+ * for example "I just joined SITE_NAME, awesome site
* + link +
*
* And there will be 2 buttons Submit and Cancel
* Cancel will close window
*
- * @return unknown_type
+ * @param array $a
+ *
+ * @return void
*/
protected function closeWindow(array $a = array())
{
@@ -691,7 +690,7 @@ protected function closeWindow(array $a = array())
$s = Responder::PAGE_OPEN . Responder::JS_OPEN .
$script .
Responder::JS_CLOSE .
- '<h2>You have successfully logged in. You should close this window now</h2>' .
+ '<h2>@@You have successfully logged in. You should close this window now@@</h2>' .
//print_r($_SESSION, 1).
Responder::PAGE_CLOSE;
d('cp s: ' . $s);
@@ -735,7 +734,7 @@ protected function redirectToTwitter($url)
setTimeout(myredirect, 300);
' .
Responder::JS_CLOSE .
- '<div class="centered"><a href="' . $url . '">If you are not redirected in 2 seconds, click here to authenticate with Twitter</a></div>' .
+ '<div class="centered"><a href="' . $url . '">@@If you are not redirected in 2 seconds, click here to authenticate with Twitter@@</a></div>' .
Responder::PAGE_CLOSE;
d('exising with this $s: ' . $s);
View
28 lib/Lampcms/Exception.php
@@ -53,7 +53,7 @@
/**
* All Exceptions defined here
*
- * @important Allways include this file!
+ * @important Always include this file!
*
* @author Dmitri Snytkine
*
@@ -226,7 +226,7 @@ public static function formatException(\Exception $e, $message = '', \Lampcms\I1
* @todo if Tr was passed here
* then we can translate string
*/
- $message = (true === LAMPCMS_DEBUG) ? $e->getMessage() : 'Error occured. Administrator has been notified or the error. We will fix this as soon as possible'; //$oTr->get('generic_error', 'exceptions');
+ $message = (true === LAMPCMS_DEBUG) ? $e->getMessage() : 'Error occurred. Administrator has been notified or the error. We will fix this as soon as possible'; //$oTr->get('generic_error', 'exceptions');
}
/**
@@ -239,7 +239,7 @@ public static function formatException(\Exception $e, $message = '', \Lampcms\I1
$message = \htmlspecialchars($message);
$aArgs = ($e instanceof \Lampcms\Exception) ? $e->getArgs() : null;
- $message = (!empty($aArgs)) ? vsprintf($message, $aArgs) : $message;
+ $message = (!empty($aArgs)) ? \vsprintf($message, $aArgs) : $message;
if ($Tr) {
@@ -253,7 +253,7 @@ public static function formatException(\Exception $e, $message = '', \Lampcms\I1
$intLine = $e->getLine();
$intCode = ($e instanceof \ErrorException) ? $e->getSeverity() : $e->getCode();
- $sLogMessage = 'Exception caught: ' . get_class($e) . "\n" . $message . "\n" . 'error code: ' . $intCode . "\n" . 'file: ' . $strFile . "\n" . 'line: ' . $intLine . "\n" . 'stack: ' . $sTrace . "\n";
+ $sLogMessage = 'Exception caught: ' . \get_class($e) . "\n" . $message . "\n" . 'error code: ' . $intCode . "\n" . 'file: ' . $strFile . "\n" . 'line: ' . $intLine . "\n" . 'stack: ' . $sTrace . "\n";
d($sLogMessage . "\n" . '$_REQUEST: ' . print_r($_REQUEST, true));
if (!empty($_SESSION)) {
d('$_SESSION: ' . print_r($_SESSION, 1));
@@ -262,7 +262,7 @@ public static function formatException(\Exception $e, $message = '', \Lampcms\I1
$sError .= $message . "\n";
if ((defined('LAMPCMS_DEBUG')) && true === LAMPCMS_DEBUG) {
- $sError .= "\nException Class: " . get_class($e) . BR;
+ $sError .= "\nException Class: " . \get_class($e) . BR;
$sError .= "\nError code: $intCode\n";
$sError .= "\nFile: $strFile\n";
$sError .= "\nLine: $intLine\n";
@@ -326,25 +326,25 @@ public static function getExceptionTraceAsString(\Exception $exception)
if (isset($frame['args'])) {
$args = array();
foreach ($frame['args'] as $arg) {
- if (is_string($arg)) {
+ if (\is_string($arg)) {
$args[] = "'" . $arg . "'";
- } elseif (is_array($arg)) {
+ } elseif (\is_array($arg)) {
$args[] = "Array";
- } elseif (is_null($arg)) {
+ } elseif (\is_null($arg)) {
$args[] = 'NULL';
- } elseif (is_bool($arg)) {
+ } elseif (\is_bool($arg)) {
$args[] = ($arg) ? "true" : "false";
} elseif (is_object($arg)) {
- $args[] = get_class($arg);
+ $args[] = \get_class($arg);
} elseif (is_resource($arg)) {
- $args[] = get_resource_type($arg);
+ $args[] = \get_resource_type($arg);
} else {
$args[] = $arg;
}
}
- $args = join(", ", $args);
+ $args = \join(", ", $args);
}
- $rtn .= sprintf("#%s %s(%s): %s(%s)\n",
+ $rtn .= \sprintf("#%s %s(%s): %s(%s)\n",
$count,
self::getOffset($frame, 'file'),
self::getOffset($frame, 'line'),
@@ -367,7 +367,7 @@ public static function getExceptionTraceAsString(\Exception $exception)
*/
protected static function getOffset(array $a, $key)
{
- return (array_key_exists($key, $a) ? $a[$key] : '');
+ return (\array_key_exists($key, $a) ? $a[$key] : '');
}
} // end Lampcms\Exceptions class
View
2  lib/Lampcms/Responder.php
@@ -59,7 +59,7 @@ class Responder
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link type="text/css" rel="stylesheet" href="/style/1/www/_main.css">
+<link type="text/css" rel="stylesheet" href="{_DIR_}/style/1/www/_main.css">
</head>
<body>';
View
1  lib/Lampcms/WebPage.php
@@ -709,7 +709,6 @@ public function getResult()
d('cp');
return $tpl;
-
}
View
2  www/index.php
@@ -143,7 +143,7 @@
* may never be saved. It's worth trying commenting this out
* and running the site for awhile. If noticing any problems
* with sessions (like user suddenly logged out
- * while browsing beteen pages) then uncomment this
+ * while browsing between pages) then uncomment this
*/
// session_write_close();
//ob_end_flush();
View
20 www/js/qa.js
@@ -464,7 +464,7 @@ oSL.tweet = (function () {
sForm = '<div class="hd">Please enter your information</div>'
+ '<div class="bd"><hr/>'
- + '<form method="POST" action="'+ web_root +'">'
+ + '<form method="POST" action="'+ web_root +'/">'
+ '<input type="hidden" name="a" value="tweet">'
+ '<input type="hidden" name="token" value="'
+ token
@@ -1039,7 +1039,7 @@ YUI({
* reply-to-comment form
*/
tplComform = '<div id="comm_wrap_{divID}" class="fl cb{extraClass}">'
- + '<form action="{web_root}" id="add-comment-{formID}" class="comform" method="post">'
+ + '<form action="{web_root}/" id="add-comment-{formID}" class="comform" method="post">'
+ '<input type="hidden" name="a" value="addcomment">'
+ '<input type="hidden" name="rid" value="{resID}">'
+ '<input type="hidden" name="parentid" value="{parentID}">'
@@ -2193,7 +2193,7 @@ YUI({
}
}
- form = '<form name="form_f" action="'+ getMeta('web_root') + '">'
+ form = '<form name="form_f" action="'+ getMeta('web_root') + '/">'
+ '<input type="hidden" name="a" value="follow">'
+ '<input type="hidden" name="ftype" value="' + ftype + '">'
+ '<input type="hidden" name="follow" value="' + follow + '">'
@@ -3195,7 +3195,7 @@ YUI({
faction = 'flagcomment';
}
form = '<div id="div_flag" style="text-align: left">'
- + '<form name="form_flag" action="'+ getMeta('web_root') + '">'
+ + '<form name="form_flag" action="'+ getMeta('web_root') + '/">'
+ '<input type="hidden" name="a" value="' + faction + '">'
+ '<input type="hidden" name="rid" value="{rid}">'
+ '<input type="hidden" name="token" value="' + getToken() + '">'
@@ -3223,7 +3223,7 @@ YUI({
var oAlert, form;
if (ensureLogin()) {
form = '<div style="text-align: left">'
- + '<form name="form_close" id="id_close" action="'+ getMeta('web_root') + '">'
+ + '<form name="form_close" id="id_close" action="'+ getMeta('web_root') + '/">'
+ '<input type="hidden" name="a" value="close">'
+ '<input type="hidden" name="token" value="' + getToken() + '">'
+ '<input type="hidden" name="qid" value="' + qid + '">'
@@ -3258,7 +3258,7 @@ YUI({
//Y.log('sTags: ' + sTags);
form = '<div id="div_flag" style="text-align: left">'
- + '<form name="form_flag" id="id_flag" action="'+ getMeta('web_root') + '">'
+ + '<form name="form_flag" id="id_flag" action="'+ getMeta('web_root') + '/">'
+ '<input type="hidden" name="a" value="retag">'
+ '<input type="hidden" name="token" value="' + getToken() + '">'
+ '<input type="hidden" name="qid" value="' + getMeta('qid') + '">'
@@ -3284,7 +3284,7 @@ YUI({
if (confirm('Really delete this comment?')) {
comment = Y.one("#comment-" + resID);
if (comment) {
- myform = '<form name="form_del" action="'+ getMeta('web_root') + '">'
+ myform = '<form name="form_del" action="'+ getMeta('web_root') + '/">'
+ '<input type="hidden" name="a" value="deletecomment">'
+ '<input type="hidden" name="rid" value="' + resID + '">'
+ '<input type="hidden" name="token" value="' + getToken() + '">';
@@ -3321,7 +3321,7 @@ YUI({
banCheckbox = '<br><input type="checkbox" name="ban"><label> Ban poster</label><br>';
}
form = '<div id="div_del" style="text-align: left">'
- + '<form name="form_del" action="'+ getMeta('web_root') + '">'
+ + '<form name="form_del" action="'+ getMeta('web_root') + '/">'
+ '<input type="hidden" name="a" value="' + a + '">'
+ '<input type="hidden" name="rid" value="{rid}">'
+ '<input type="hidden" name="token" value="' + getToken() + '">'
@@ -3511,7 +3511,7 @@ YUI({
//Y.log('1555 mmdDecoded: ' + content);
form = '<div id="comm_wrap_' + resID + '" class="fl cb">'
- + '<form action="'+ getMeta('web_root' )+ '" id="edit-comment-' + resID + '" class="comform" method="post">'
+ + '<form action="'+ getMeta('web_root' )+ '/" id="edit-comment-' + resID + '" class="comform" method="post">'
+ '<input type="hidden" name="a" value="editcomment">'
+ '<input type="hidden" name="commentid" value="' + resID + '">'
+ '<input type="hidden" name="token" value="' + getToken() + '">'
@@ -3536,7 +3536,7 @@ YUI({
var id = uid.substr(5);
//Y.log('uid: ' +id);
form = '<div id="div_del" style="text-align: left">'
- + '<form name="form_shred" id="id_shred" action="'+ getMeta('web_root') + '">'
+ + '<form name="form_shred" id="id_shred" action="'+ getMeta('web_root') + '/">'
+ '<input type="hidden" name="a" value="shred">'
+ '<input type="hidden" name="uid" value="' + id + '">'
+ '<input type="hidden" name="token" value="' + getToken() + '">'
View
4 www/style/1/www/tplComform.php
@@ -48,7 +48,7 @@ class tplComform extends Lampcms\Template\Fast
'label' => '', //5
'avatar' => '',
'text' => '',
- 'btn' => 'Post comment',
+ 'btn' => '@@Post comment@@',
'header' => '',
'connectBlock' => '', //10
'readonly' => 'no', //11
@@ -62,7 +62,7 @@ class tplComform extends Lampcms\Template\Fast
<a name="com_label"></a>
<span class="com_label rounded">%5$s</span>
%10$s
- <form class="comment_form" accept-charset="utf-8" action="/index.php" enctype="application/x-www-form-urlencoded" method="post" name="uForm">
+ <form class="comment_form" accept-charset="utf-8" action="{_WEB_ROOT_}" enctype="application/x-www-form-urlencoded" method="post" name="uForm">
<input name="a" type="hidden" value="rcomment">
<input name="token" type="hidden" value="%1$s">
<input name="rid" type="hidden" value="%2$s">
View
2  www/style/1/www/tplFormRegister.php
@@ -47,7 +47,7 @@ class tplFormRegister extends \Lampcms\Template\Fast
protected static $vars = array();
- protected static $tpl = '<form id="regform" method="post" action="{_WEB_ROOT_}">
+ protected static $tpl = '<form id="regform" method="post" action="{_WEB_ROOT_}/">
<input type="hidden" name="a" value="%13$s"/>
<input type="hidden" name="tzo" value=""/>
<input type="hidden" name="token" value="%4$s"/>
View
2  www/style/1/www/tplFormapiclient.php
@@ -101,7 +101,7 @@ protected static function func(&$a)
);
protected static $tpl = '
- <form name="epForm" method="POST" action="{_WEB_ROOT_}" enctype="multipart/form-data" accept-charset="utf-8">
+ <form name="epForm" method="POST" action="{_WEB_ROOT_}/" enctype="multipart/form-data" accept-charset="utf-8">
<input type="hidden" name="a" value="editapp">
<input type="hidden" name="app_id" value="%3$s">
<input type="hidden" name="token" value="%1$s">
View
2  www/style/1/www/tplFormedit.php
@@ -85,7 +85,7 @@ class tplFormedit extends Lampcms\Template\Fast
protected static $tpl = '
<div id="edit_form">
<div class="form_error">%16$s</div>
- <form class="qa_form" name="editor" method="POST" action="{_WB_ROOT_}" accept-charset="utf-8">
+ <form class="qa_form" name="editor" method="POST" action="{_WB_ROOT_}/" accept-charset="utf-8">
<input type="hidden" name="a" value="editor">
<input type="hidden" name="token" value="%1$s">
<input type="hidden" name="rtype" value="%15$s">
View
2  www/style/1/www/tplFormprofile.php
@@ -107,7 +107,7 @@ class tplFormprofile extends Lampcms\Template\Fast
protected static $tpl = '
- <form name="epForm" method="POST" action="{_WEB_ROOT_}" enctype="multipart/form-data" accept-charset="utf-8">
+ <form name="epForm" method="POST" action="{_WEB_ROOT_}/" enctype="multipart/form-data" accept-charset="utf-8">
<input type="hidden" name="a" value="editprofile">
<input type="hidden" name="uid" value="%39$s">
<input type="hidden" name="token" value="%1$s">
View
77 www/style/1/www/tplGfcCode.php
@@ -1,77 +0,0 @@
-<?php
-/**
- *
- * PHP 5.3 or better is required
- *
- * @package Global functions
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * @author Dmitri Snytkine <cms@lampcms.com>
- * @copyright 2005-2012 (or current year) Dmitri Snytkine
- * @license http://www.gnu.org/licenses/gpl-3.0.txt The GNU General Public License (GPL) version 3
- * @link http://cms.lampcms.com Lampcms.com project
- * @version Release: @package_version@
- *
- *
- */
-
-/**
- * Extra Javascript code required
- * for Google FriendConnect
- * @author Dmitri Snytkine
- *
- */
-class tplGfcCode extends Lampcms\Template\Fast
-{
- protected static $vars = array('id' => '');
-
- protected static $tpl = '
-<script src="http://www.google.com/jsapi"></script>
-<script type="text/javascript">
- google.load(\'friendconnect\', \'0.8\');
-</script>
-<script type="text/javascript">
- var initGfc = function(times) {
- if (times > 1) {
- window.top.location.reload(true);
- }
- };
-
- var onFriendConnectInitialized = function(st) {
- if(!window.friendconnect_times_loaded) {
- window.friendconnect_times_loaded = 1;
- } else {
- window.friendconnect_times_loaded++;
- }
-
- initGfc(window.friendconnect_times_loaded);
- };
-
- google.friendconnect.container.loadOpenSocialApi( {
- site : \'%1$s\',
- onload : onFriendConnectInitialized
- });
-</script>';
-
-}
View
14 www/style/1/www/tplLoginblock.php
@@ -51,25 +51,25 @@ class tplLoginblock extends Lampcms\Template\Fast
protected static $tpl = '
<div class="loginBlock">
- <form accept-charset="utf-8" action="/index.php" method="post" enctype="application/x-www-form-urlencoded" name="mLogin" id="mLogin">
+ <form accept-charset="utf-8" action="{_WEB_ROOT_}/" method="post" enctype="application/x-www-form-urlencoded" name="mLogin" id="mLogin">
<input name="a" type="hidden" value="login">
<table class="login_block">
<tr>
<th colspan="2">%1$s</th>
</tr>
<tr>
- <td colspan="2">Username<br>
+ <td colspan="2">@@Username@@<br>
<input type="text" class="inlogin" name="login" id="login" size="15" accesskey="u" tabindex="41">
</td></tr>
<tr>
- <td colspan="2">Password<br>
+ <td colspan="2">@@Password@@<br>
<input type="password" name="pwd" class="inpwd" id="pwd" size="10" tabindex="42"><br>
- <a href="/remindpwd/" class="forgot">Forgot password?</a>
+ <a href="{_WEB_ROOT_}/{_remindpwd_}/" class="forgot">@@Forgot password@@?</a>
</td></tr>
<tr>
<td class="chkRemember" align="left" nowrap><label for="chkRemember">
- <input name="chkRemember" type="checkbox" value="3" id="chkRemember">Remember me?</label></td>
- <td align="left" class="btnGo"><input id="go" value="Log in" type="submit" tabindex="43"></td>
+ <input name="chkRemember" type="checkbox" value="3" id="chkRemember">@@Remember me@@?</label></td>
+ <td align="left" class="btnGo"><input id="go" value="@@Log in@@" type="submit" tabindex="43"></td>
</tr>
</table>
</form>
@@ -77,4 +77,4 @@ class tplLoginblock extends Lampcms\Template\Fast
';
}
-?>
+?>
View
3  www/style/1/www/tplRegform.php
@@ -77,7 +77,7 @@ class tplRegform extends Lampcms\Template\Fast
<table class="mainreg">
<tr>
<td>
- <form id="regform" method="post" action="{_WEB_ROOT_}">
+ <form id="regform" method="post" action="{_WEB_ROOT_}/">
<input type="hidden" name="a" value="%13$s">
<input type="hidden" name="tzo" value="">
<input type="hidden" name="token" value="%4$s">
@@ -137,4 +137,3 @@ class tplRegform extends Lampcms\Template\Fast
}
-?>
View
6 www/style/1/www/tplTumblrblogs.php
@@ -51,7 +51,7 @@
/**
* This template is for a "Select Tumblr blog"
- * small html form that will apper
+ * small html form that will appear
* in a popup "Connect to Tumblr" window
* only if it's detected that User has more than one
* blog on Tumblr, in which case use must select
@@ -67,13 +67,13 @@ class tplTumblrblogs extends \Lampcms\Template\Fast
'token' => '', //1
'options' => '', //2
'label' => '', //3
- 'save' => '', //4
+ 'save' => '@@Save@@', //4
'a' => 'tumblrselect' //5
);
protected static $tpl = '
- <form action="/index.php" name="tumblrblogs" method="POST" action="/index.php" accept-charset="utf-8">
+ <form action="/index.php" name="tumblrblogs" method="POST" action="{_WEB_ROOT_}/" accept-charset="utf-8">
<input type="hidden" name="a" value="%5$s">
<input type="hidden" name="blogselect" value="1">
<input type="hidden" name="token" value="%1$s">
Please sign in to comment.
Something went wrong with that request. Please try again.