remove Disqus widget (privacy concerns and ads)
This commit is contained in:
parent
74f6f34b16
commit
b4d821fba6
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ demos
|
|||||||
workspace.xml
|
workspace.xml
|
||||||
*.secret
|
*.secret
|
||||||
.idea/
|
.idea/
|
||||||
|
runtime/
|
||||||
|
@ -693,16 +693,6 @@ ul.nav li.dropdown-append:hover > ul.dropdown-menu {
|
|||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* disqus
|
|
||||||
-------------------------------------------------- */
|
|
||||||
|
|
||||||
.disqus_owner {
|
|
||||||
border-radius: 6px;
|
|
||||||
border: 1px solid #D7E0E2;
|
|
||||||
padding: 10px;
|
|
||||||
background-color: #ECF0F1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* blog/view
|
/* blog/view
|
||||||
-------------------------------------------------- */
|
-------------------------------------------------- */
|
||||||
|
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
<?php
|
|
||||||
echo "Mikescher.de - " . date('Y-m-d H:i:s') . "<br>\n";
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
echo "File: " . __FILE__ . "<br>\n";
|
|
||||||
echo "[C] Time: " . date("F d Y H:i:s.", filectime(__FILE__)) . "<br>\n";
|
|
||||||
echo "[M] Time: " . date("F d Y H:i:s.", filemtime(__FILE__)) . "<br>\n";
|
|
||||||
echo "[MD5] File: " . md5_file (__FILE__) . "<br>\n";
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
echo "POST:" . print_r($_POST, true);
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
echo "GET:" . print_r($_GET, true);
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
echo dirname(__FILE__);
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
echo dirname(__FILE__) . '/../framework/yii.php';
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
echo dirname(__FILE__) . '/protected/config/main.php';
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir("/") );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir(".") );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir(dirname(__FILE__)) );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir(dirname(__FILE__) . '/protected/') );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir(dirname(__FILE__) . '/protected/controllers/') );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir('/mnt/web1/e3/60/51559660/htdocs/www/protected/controllers/') );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir('/') );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir('/../') );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir('/../framework/') );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
/*?*/ echo ( is_file('/mnt/web1/e3/60/51559660/htdocs/www/protected/controllers/MsmainController.php') ? 'true' : 'false' ) . "<br>\n";
|
|
||||||
/*-*/ echo ( is_file('/mnt/web1/e3/60/51559660/htdocs/www/protected/controllers/MSMainController.php') ? 'true' : 'false' ) . "<br>\n";
|
|
||||||
/*-*/ echo ( is_file('/protected/controllers/MSMainController.php') ? 'true' : 'false' ) . "<br>\n";
|
|
||||||
/*+*/ echo ( is_file('protected/controllers/MSMainController.php') ? 'true' : 'false' ) . "<br>\n";
|
|
||||||
/*-*/ echo ( is_file('/www/protected/controllers/MSMainController.php') ? 'true' : 'false' ) . "<br>\n";
|
|
||||||
/*+*/ echo ( is_file('protected/controllers/MSMainController.php') ? 'true' : 'false' ) . "<br>\n";
|
|
||||||
/*+*/ echo ( is_file(dirname(__FILE__) . '/protected/controllers/MSMainController.php') ? 'true' : 'false' ) . "<br>\n";
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
print_r( scandir(dirname(__FILE__) . '/protected/views/') );
|
|
||||||
echo "\n<hr>\n";
|
|
||||||
|
|
||||||
// change the following paths if necessary
|
|
||||||
$yii= dirname(__FILE__) . '/../framework/yii.php';
|
|
||||||
$config= dirname(__FILE__) . '/protected/config/main.php';
|
|
||||||
|
|
||||||
// remove the following lines when in production mode
|
|
||||||
defined('YII_DEBUG') or define('YII_DEBUG',true);
|
|
||||||
// dev or prod - merges settings with respective file
|
|
||||||
defined('YII_CUSTOM_ENV') or define('YII_CUSTOM_ENV', 'prod');
|
|
||||||
|
|
||||||
require_once($yii);
|
|
||||||
Yii::createWebApplication($config)->run();
|
|
@ -104,7 +104,7 @@ class MsHelper {
|
|||||||
* @param $after
|
* @param $after
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function encloseLines($input, $before, $after)
|
public static function encloseLines($input, $before, $after)
|
||||||
{
|
{
|
||||||
$array = preg_split("/\r\n|\n|\r/", $input);
|
$array = preg_split("/\r\n|\n|\r/", $input);
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
.orig
|
|
||||||
.orig.*
|
|
||||||
.chg.*
|
|
||||||
.rej
|
|
||||||
.conflict~
|
|
||||||
.idea/
|
|
||||||
nbproject/
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
!.gitignore
|
|
||||||
assets/
|
|
||||||
protected/runtime/
|
|
||||||
themes/classic/views/
|
|
@ -1,27 +0,0 @@
|
|||||||
Copyright (c) 2013, Anton Kucherov
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Neither the name of the {organization} nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER 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.
|
|
@ -1,48 +0,0 @@
|
|||||||
YiiDisqusWidget
|
|
||||||
===============
|
|
||||||
|
|
||||||
This is sample widget wich can help you to add DISQUS
|
|
||||||
support in to your Yii site.
|
|
||||||
|
|
||||||
##Requirements
|
|
||||||
|
|
||||||
You must be registered on [DISQUS](http://disqus.com/)
|
|
||||||
|
|
||||||
##Installation
|
|
||||||
|
|
||||||
Copy `YiiDisqusWidget` folder in you `protected/extensions` folder.
|
|
||||||
|
|
||||||
##Usage
|
|
||||||
|
|
||||||
Just add this code on your page where you need to include DISQUS.
|
|
||||||
Simple usage:
|
|
||||||
```php
|
|
||||||
// DISQUS_SHORTNAME - You disqus_shortname from DISQUS.
|
|
||||||
$this->widget('ext.YiiDisqusWidget.YiiDisqusWidget',array('shortname'=>'DISQUS_SHORTNAME'));
|
|
||||||
```
|
|
||||||
|
|
||||||
You can change all off `disqus_` parameters in options array:
|
|
||||||
```javascript
|
|
||||||
var disqus_shortname;
|
|
||||||
var disqus_identifier;
|
|
||||||
var disqus_title;
|
|
||||||
var disqus_url;
|
|
||||||
```
|
|
||||||
Just add it in option array:
|
|
||||||
```php
|
|
||||||
$this->widget(
|
|
||||||
'ext.YiiDisqusWidget.YiiDisqusWidget',
|
|
||||||
array(
|
|
||||||
'shortname' => 'DISQUS_SHORTNAME',
|
|
||||||
'identifier' => 'DISQUS_IDENTIFIER',
|
|
||||||
'title' => 'DISQUS_TITLE',
|
|
||||||
'url' => 'DISQUS_URL',
|
|
||||||
'category_id' => 'DISQUS_CATEGORY_ID',
|
|
||||||
)
|
|
||||||
);
|
|
||||||
```
|
|
||||||
More information about DISQUS variables on [http://help.disqus.com/](http://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables#disqus_shortname)
|
|
||||||
|
|
||||||
##Resources
|
|
||||||
|
|
||||||
* [GitHub](https://github.com/DexterHD/YiiDisqusWidget)
|
|
@ -1,56 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Widget for insert Disqus code in to page.
|
|
||||||
*
|
|
||||||
* @author Anton Kucherov <idexter.ru@gmail.com>
|
|
||||||
* @link http://idexter.ru/
|
|
||||||
* @copyright 2013 idexter.ru
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* YiiDisqusWidget
|
|
||||||
* @author Anton Kucherov <idexter.ru@gmail.com>
|
|
||||||
*/
|
|
||||||
class YiiDisqusWidget extends CWidget
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var string disqus_shortname
|
|
||||||
*/
|
|
||||||
public $shortname;
|
|
||||||
/**
|
|
||||||
* @var string disqus_identifier
|
|
||||||
*/
|
|
||||||
public $identifier;
|
|
||||||
/**
|
|
||||||
* @var string disqus_title
|
|
||||||
*/
|
|
||||||
public $title;
|
|
||||||
/**
|
|
||||||
* @var string disqus_url
|
|
||||||
*/
|
|
||||||
public $url;
|
|
||||||
/**
|
|
||||||
* @var string disqus_category_id
|
|
||||||
*/
|
|
||||||
public $category_id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws CHttpException
|
|
||||||
*/
|
|
||||||
public function init()
|
|
||||||
{
|
|
||||||
parent::init();
|
|
||||||
if (empty($this->shortname)) {
|
|
||||||
throw new CHttpException(500, Yii::t('YiiDisqusWidget', 'Parameter "disqus_shortname" is not set'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$params = array();
|
|
||||||
$params['shortname'] = $this->shortname;
|
|
||||||
$params['identifier'] = $this->identifier;
|
|
||||||
$params['title'] = $this->title;
|
|
||||||
$params['url'] = $this->url;
|
|
||||||
$params['category_id'] = $this->category_id;
|
|
||||||
|
|
||||||
$this->render('yiidisqus',$params);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Template for YiiDisqusWidget
|
|
||||||
*
|
|
||||||
* @author Anton Kucherov <idexter.ru@gmail.com>
|
|
||||||
* @link http://idexter.ru/
|
|
||||||
* @copyright 2013 idexter.ru
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
<div id="disqus_thread"></div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
|
||||||
var disqus_shortname = '<?php echo $shortname; ?>'; // required: replace example with your forum shortname
|
|
||||||
|
|
||||||
<?php if($identifier!=''): ?>
|
|
||||||
var disqus_identifier = '<?php echo $identifier; ?>';
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if($title!=''): ?>
|
|
||||||
var disqus_title = '<?php echo $title; ?>';
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if($url!=''): ?>
|
|
||||||
var disqus_url = '<?php echo $url; ?>';
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if($category_id!=''): ?>
|
|
||||||
var disqus_category_id = '<?php echo $category_id; ?>';
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
|
||||||
(function() {
|
|
||||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
|
||||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
|
||||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
|
||||||
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
|
@ -30,19 +30,4 @@ $this->breadcrumbs = array(
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="disqus_owner">
|
|
||||||
<?php
|
|
||||||
$this->widget(
|
|
||||||
'ext.YiiDisqusWidget.YiiDisqusWidget',
|
|
||||||
[
|
|
||||||
'shortname' => 'mikescher-de',
|
|
||||||
'identifier' => 'blog/view/' + $model->ID,
|
|
||||||
'title' => $model->Title,
|
|
||||||
'url' => $model->getAbsoluteLink(),
|
|
||||||
'category_id' => '3253401', // = blog/view
|
|
||||||
]
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,19 +77,4 @@ array_push($this->css_files, '/css/blogpost_BFJoustBot_style.css');
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="disqus_owner">
|
|
||||||
<?php
|
|
||||||
$this->widget(
|
|
||||||
'ext.YiiDisqusWidget.YiiDisqusWidget',
|
|
||||||
[
|
|
||||||
'shortname' => 'mikescher-de',
|
|
||||||
'identifier' => 'blog/view/' + $model->ID,
|
|
||||||
'title' => $model->Title,
|
|
||||||
'url' => $model->getAbsoluteLink(),
|
|
||||||
'category_id' => '3253401', // = blog/view
|
|
||||||
]
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -150,19 +150,4 @@ array_push($this->css_files, "/css/blogpost_ProjectEulerBefunge_style.css");
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="disqus_owner">
|
|
||||||
<?php
|
|
||||||
$this->widget(
|
|
||||||
'ext.YiiDisqusWidget.YiiDisqusWidget',
|
|
||||||
[
|
|
||||||
'shortname' => 'mikescher-de',
|
|
||||||
'identifier' => 'blog/view/' + $model->ID,
|
|
||||||
'title' => $model->Title,
|
|
||||||
'url' => $model->getAbsoluteLink(),
|
|
||||||
'category_id' => '3253401', // = blog/view
|
|
||||||
]
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -160,7 +160,7 @@ array_push($this->js_files, '/javascript/msmain_admin_script.js');
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://mikescher-de.disqus.com">Disqus Admin Panel</a></li>
|
<!--<li><a href="https://mikescher-de.disqus.com">Disqus Admin Panel</a></li>-->
|
||||||
<li><a href="https://www.strato.de/apps/CustomerService">Strato Customer Service</a></li>
|
<li><a href="https://www.strato.de/apps/CustomerService">Strato Customer Service</a></li>
|
||||||
<li><a href="http://v1.mikescher.com">Mikescher Wayback (v1)</a></li>
|
<li><a href="http://v1.mikescher.com">Mikescher Wayback (v1)</a></li>
|
||||||
<li><a href="http://v2.mikescher.com">Mikescher Wayback (v2)</a></li>
|
<li><a href="http://v2.mikescher.com">Mikescher Wayback (v2)</a></li>
|
||||||
|
@ -85,20 +85,6 @@ if (!$model->visible && Yii::app()->user->name != 'admin') {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<div class="disqus_owner">
|
|
||||||
<?php
|
|
||||||
$this->widget(
|
|
||||||
'ext.YiiDisqusWidget.YiiDisqusWidget',
|
|
||||||
[
|
|
||||||
'shortname' => 'mikescher-de',
|
|
||||||
'identifier' => 'programs/view/' + $model->ID,
|
|
||||||
'title' => $model->Name,
|
|
||||||
'url' => $model->getAbsoluteLink(),
|
|
||||||
'category_id' => '3253400', // = programs/view
|
|
||||||
]
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
|
Loading…
Reference in New Issue
Block a user