-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1ad30e
commit 59d0b20
Showing
8 changed files
with
374 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
$lang['linklist']['name'] = "Freie Linkliste"; | ||
$lang['linklist']['intro'] = "Linkliste mit Eintraegen von WWW-Usern."; | ||
$lang['linklist']['author'] = 'Bas Steelooper (rewrite of the module from divoma.media to 4.7)'; | ||
$lang['linklist']['main'] = "Linklist module"; | ||
$lang['linklist']['pagessite'] = "Sie haben einen neuen Link?"; | ||
$lang['linklist']['adminpage'] = "Links Aktivieren"; | ||
$lang['linklist']['newlink'] = "Ihren Link-Tipp koennen Sie uns hier uebermitteln."; | ||
$lang['linklist']['title'] = "Seitenname"; | ||
$lang['linklist']['link'] = "WWW-Adresse zum Link"; | ||
$lang['linklist']['descr'] = "Seiten-Beschreibung"; | ||
$lang['linklist']['send'] = "Absenden"; | ||
$lang['linklist']['fillall'] = "Es sind nicht alle Felder ausgefuellt."; | ||
$lang['linklist']['nohtml'] = "HTML-Tags sind hier nicht erlaubt"; | ||
$lang['linklist']['activate'] = "Link Aktivieren"; | ||
$lang['linklist']['delete'] = "Link Entfernen"; | ||
$lang['linklist']['deleted'] = " ist vom System entfernt worden."; | ||
$lang['linklist']['backlink'] = "Zurueck zur Hauptseite"; | ||
$lang['linklist']['wsend'] = "Ihr Link ist uebermittelt worden. Die Freischaltung erfolgt durch den Administrator."; | ||
$lang['linklist']['msubject'] = "Neuer Link"; | ||
$lang['linklist']['mail'] = "Ein neuer Link ist uebermittelt worden:"; | ||
$lang['linklist']['mail_tit'] = "Sitetitle:"; | ||
$lang['linklist']['mail_dis'] = "Description:"; | ||
$lang['linklist']['mail_lnk'] = "Sitelink:"; | ||
$lang['linklist']['exhead'] = "Disclaimer"; | ||
$lang['linklist']['exredir'] = "Sie werden automatisch auf die gewuenschte Seite geleitet. Bitte Pop-Up-Blocker deaktivieren."; | ||
$lang['linklist']['adminset'] = "Einstellungen der Linkliste."; | ||
$lang['linklist']['pageis'] = "Disclaimer Seite"; | ||
$lang['linklist']['settings'] = "Einstellungen"; | ||
$lang['linklist']['save'] = "Einstellungen speichern."; | ||
$lang['linklist']['distext'] = "Eingabe des Disclaimertextes hier."; | ||
|
||
?> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
$lang['linklist']['name'] = "Linklist"; | ||
$lang['linklist']['intro'] = "Module to create a linklist with userentries."; | ||
$lang['linklist']['author'] = 'Bas Steelooper (rewrite of the module from divoma.media to 4.7)'; | ||
$lang['linklist']['main'] = "Linklist module"; | ||
$lang['linklist']['pagessite'] = "Create new link"; | ||
$lang['linklist']['adminpage'] = "Activate Links"; | ||
$lang['linklist']['newlink'] = "Create New Link"; | ||
$lang['linklist']['title'] = "Sitetitle"; | ||
$lang['linklist']['link'] = "Link to page"; | ||
$lang['linklist']['descr'] = "Sitedescription"; | ||
$lang['linklist']['send'] = "Send Link"; | ||
$lang['linklist']['fillall'] = "You didn't fill all fields."; | ||
$lang['linklist']['nohtml'] = "HTML-Tags in entries are not allowed"; | ||
$lang['linklist']['activate'] = "Activate link"; | ||
$lang['linklist']['delete'] = "Delete Link"; | ||
$lang['linklist']['deleted'] = " was deleted from system."; | ||
$lang['linklist']['backlink'] = "Back to main page"; | ||
$lang['linklist']['wsend'] = "Your Link was send to the administration console."; | ||
$lang['linklist']['msubject'] = "New Link"; | ||
$lang['linklist']['mail'] = "A New link was send to your page:"; | ||
$lang['linklist']['mail_tit'] = "Sitetitle:"; | ||
$lang['linklist']['mail_dis'] = "Description:"; | ||
$lang['linklist']['mail_lnk'] = "Sitelink:"; | ||
$lang['linklist']['exhead'] = "Disclaimer"; | ||
$lang['linklist']['exredir'] = "You will be redirected to"; | ||
$lang['linklist']['adminset'] = "Settings for your linklist"; | ||
$lang['linklist']['pageis'] = "Disclaimer Page"; | ||
$lang['linklist']['settings'] = "Settings"; | ||
$lang['linklist']['save'] = "Save Settings"; | ||
$lang['linklist']['distext'] = "Enter your Disclaimertext here" | ||
?> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
<?php | ||
//This is a module for pluck, an opensource content management system | ||
//Website: http://www.pluck-cms.org | ||
|
||
//MODULE NAME: Linklist | ||
//LICENSE: MIT | ||
|
||
//Make sure the file isn't accessed directly | ||
defined('IN_PLUCK') or exit('Access denied!'); | ||
|
||
function linklist_pages_admin() { | ||
global $lang; | ||
|
||
$module_page_admin[] = array( | ||
'func' => 'Main', | ||
'title' => $lang['linklist']['main'] | ||
); | ||
$module_page_admin[] = array( | ||
'func' => 'activate', | ||
'title' => $lang['linklist']['adminpage'] | ||
); | ||
$module_page_admin[] = array( | ||
'func' => 'settings', | ||
'title' => $lang['linklist']['adminset'] | ||
); | ||
|
||
return $module_page_admin; | ||
} | ||
|
||
function linklist_page_admin_Main() { | ||
global $lang; | ||
|
||
showmenudiv($lang['linklist']['adminpage'],$lang['linklist']['adminpage'],'data/image/note.png','admin.php?module=linklist&page=activate',false); | ||
showmenudiv($lang['linklist']['adminset'],$lang['linklist']['adminset'],'data/image/options.png','admin.php?module=linklist&page=settings',false); | ||
// showmenudiv($lang['linklist']['edit_info'],$lang['linklist']['edit_info_info'],'data/modules/linklist/images/theme.png','admin.php?module=editor&page=Info',false); | ||
|
||
if (!file_exists('data/settings/modules/linklist')) { | ||
mkdir('data/settings/modules/linklist', 0775, true); | ||
} | ||
|
||
if (!file_exists('data/settings/modules/linklist/new')) { | ||
mkdir('data/settings/modules/linklist/new', 0775, true); | ||
} | ||
|
||
if (isset($_GET['delete'])) { | ||
unlink ('data/settings/modules/linklist/'.$_GET['delete']); | ||
echo $file . $lang['linklist']['deleted']; | ||
redirect ('?module=linklist','0'); | ||
} | ||
|
||
$dir = opendir('data/settings/modules/linklist/'); | ||
while (false !== ($file = readdir($dir))) { | ||
if(($file !== ".") and ($file !== "..") and ($file != "new")) { | ||
include ('data/settings/modules/linklist/'.$file); | ||
echo ' | ||
<div class="menudiv" style="margin: 10px;"> | ||
<table width="100%"> | ||
<tr> | ||
<td width="20"><img src="data/image/website_small.png"></td> | ||
<td> | ||
<span><a href="'.$sitelink.'" target="_blank">'.$sitename.'</a></span> | ||
</td> | ||
<td align="right"> | ||
<a href="?module=linklist&delete='.$file.'"><img src="data/image/trash_small.png" border="0" title="'.$lang['linklist']['delete'].'" alt="'.$lang['linklist']['delete'].'"></a> | ||
</td> | ||
</tr> | ||
</table> | ||
</div>'; | ||
|
||
} | ||
} | ||
|
||
} | ||
|
||
function linklist_page_admin_activate(){ | ||
global $lang; | ||
showmenudiv($lang['linklist']['backlink'],false,'data/image/restore.png','?module=linklist',false); | ||
|
||
$dir = opendir('data/settings/modules/linklist/new/'); | ||
while (false !== ($file = readdir($dir))) { | ||
if(($file !== ".") and ($file !== "..")) { | ||
include ('data/settings/modules/linklist/new/'.$file); | ||
echo ' | ||
<div class="menudiv" style="margin: 10px;"> | ||
<table width="100%"> | ||
<tr> | ||
<td width="20"><img src="data/image/website_small.png"></td> | ||
<td> | ||
<span><a href="'.$sitelink.'" target="_blank">'.$sitename.'</a></span> | ||
</td> | ||
<td align="right"> | ||
<a href="?module=linklist&page=activate&activate='.$file.'"><img src="data/image/add_small.png" border="0" title='.$lang['linklist']['activate'].'" alt="'.$lang['linklist']['activate'].'"></a> | ||
<a href="?module=linklist&page=activate&delete='.$file.'"><img src="data/image/trash_small.png" border="0" title="'.$lang['linklist']['delete'].'" alt="'.$lang['linklist']['delete'].'"></a> | ||
</td> | ||
</tr> | ||
</table> | ||
</div>'; | ||
} | ||
} | ||
|
||
if (isset($_GET['delete'])) { | ||
unlink ('data/settings/modules/linklist/new/' . $_GET['delete']); | ||
echo $file . $lang['linklist']['deleted']; | ||
redirect('?module=linklist','0'); | ||
} | ||
|
||
if (isset($_GET['activate'])) { | ||
copy('data/settings/modules/linklist/new/'.$_GET['activate'],'data/settings/modules/linklist/'.$_GET['activate']); | ||
unlink ('data/settings/modules/linklist/new/'.$_GET['activate']); | ||
redirect('?module=linklist&page=activate','0'); | ||
} | ||
|
||
} | ||
|
||
function linklist_page_admin_settings(){ | ||
global $lang; | ||
showmenudiv($lang['linklist']['backlink'],false,'data/image/restore.png','?module=linklist',false); | ||
if (file_exists('data/settings/modules/linklist_settings.php')){ | ||
include ("data/settings/modules/linklist_settings.php"); | ||
} | ||
else { | ||
$disclaimer="You are leaving this page. Please note that I am not responsible for the content of the following site."; | ||
} | ||
|
||
echo '<form action="" method="post"> | ||
<p>'.$lang['linklist']['distext'].':<br> | ||
<textarea name="disclaimer" cols="50" rows="5" class="mceNoEditor">'.$disclaimer.'</textarea></p> | ||
<p><input type="submit" name="Submit" value="'.$lang['linklist']['save'].'"></p> | ||
</form>'; | ||
|
||
if(isset($_POST['Submit'])) { | ||
$text = $_POST['disclaimer']; | ||
$text = str_replace("\n", '<br>',$text); | ||
$fp = fopen ('data/settings/modules/linklist_settings.php',"w"); | ||
fputs ($fp, '<?php'."\n" | ||
.'$disclaimer = "'.$text.'";'."\n" | ||
.''); | ||
fclose ($fp); | ||
|
||
redirect('?module=linklist&page=settings','0'); | ||
} | ||
} | ||
|
||
?> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
//This is a module for pluck, an opensource content management system | ||
//Website: http://www.pluck-cms.org | ||
|
||
//MODULE NAME: blog | ||
//DESCRIPTION: this module lets the user create an own blog | ||
//LICENSE: GPLv3 | ||
//This module is included with pluck | ||
|
||
//Make sure the file isn't accessed directly | ||
defined('IN_PLUCK') or exit('Access denied!'); | ||
|
||
function linklist_info() { | ||
global $lang; | ||
$module_info = array( | ||
'name' => $lang['linklist']['name'], | ||
'intro' => $lang['linklist']['intro'], | ||
'version' => '0.1', | ||
'author' => $lang['linklist']['author'], | ||
'website' => 'http://xobit.nl', | ||
'icon' => 'images/icon.png', | ||
'compatibility' => '4.7' | ||
); | ||
return $module_info; | ||
} | ||
|
||
?> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<?php | ||
//This is a module for pluck, an opensource content management system | ||
//Website: http://www.pluck-cms.org | ||
|
||
//Make sure the file isn't accessed directly. | ||
defined('IN_PLUCK') or exit('Access denied!'); | ||
|
||
//Include language-items | ||
|
||
function linklist_pages_site() { | ||
global $lang; | ||
|
||
$module_page_admin[] = array( | ||
'func' => 'Main', | ||
'title' => $lang['linklist']['main'] | ||
); | ||
$module_page_admin[] = array( | ||
'func' => 'newlink', | ||
'title' => $lang['linklist']['newlink'] | ||
); | ||
$module_page_admin[] = array( | ||
'func' => 'extern', | ||
'title' => $lang['linklist']['extern'] | ||
); | ||
|
||
return $module_page_admin; | ||
} | ||
|
||
function linklist_theme_Main() { | ||
global $lang; | ||
|
||
if (!file_exists('data/settings/modules/linklist')) { | ||
mkdir('data/settings/modules/linklist', 0775, true); | ||
} | ||
|
||
if (!file_exists('data/settings/modules/linklist/new')) { | ||
mkdir('data/settings/modules/linklist/new', 0775, true); | ||
} | ||
|
||
$dir = opendir('data/settings/modules/linklist'); | ||
while (false !== ($file = readdir($dir))) { | ||
if(($file !== ".") and ($file !== "..") and ($file !== "new")) { | ||
include ('data/settings/modules/linklist/'.$file); | ||
echo '<h2><a href="'.SITE_URL.'/'.PAGE_URL_PREFIX.CURRENT_PAGE_SEONAME.'&module=linklist&page=extern&link='.$file.'">'.$sitename.'</a></h2><div class="boxad">'.$post_content.'<br/><a href="'.SITE_URL.'/'.PAGE_URL_PREFIX.CURRENT_PAGE_SEONAME.'&module=linklist&page=extern&link='.$file.'">'.$sitelink.'</a></div>'; | ||
} | ||
} | ||
|
||
echo '<br/><a href="'.SITE_URL.'/'.PAGE_URL_PREFIX.CURRENT_PAGE_SEONAME.'&module=linklist&page=newlink">' . $lang['linklist']['newlink'] . '</a>'; | ||
|
||
} | ||
|
||
function linklist_page_site_newlink(){ | ||
global $lang; | ||
?> | ||
<div> | ||
<form method="post" action="" style="margin-top: 5px; margin-bottom: 15px;"> | ||
<?php echo $lang['linklist']['title']; ?> <br /><input name="title" type="text" value="" /><br /> | ||
<?php echo $lang['linklist']['link']; ?> <br /><input name="link" type="text" value="http://" /><br /> | ||
<?php echo $lang['linklist']['descr']; ?> <br /><textarea name="description" rows="7" cols="45" class="mceNoEditor"></textarea><br /> | ||
<input type="submit" name="Submit" value="<?php echo $lang['linklist']['send']; ?>" /> | ||
</form> | ||
</div> | ||
|
||
<?php | ||
|
||
if(isset($_POST['Submit'])) { | ||
|
||
//Check if everything has been filled in | ||
if((!isset($_POST['title'])) || (!isset($_POST['link'])) || (!isset($_POST['description']))) { ?> | ||
<span style="color: red;"><?php echo $lang['linklist']['fillall']; ?></span> | ||
<?php | ||
// exit; | ||
} | ||
else { | ||
//Then fetch our posted variables | ||
$title = $_POST['title']; | ||
$sitelink = $_POST['link']; | ||
$description = $_POST['description']; | ||
|
||
//Check for HTML, and eventually block it | ||
if ((ereg('<', $title)) || (ereg('>', $title)) || (ereg('<', $sitelink)) || (ereg('>', $sitelink)) || (ereg('<', $description)) || (ereg('>', $description))) { ?> | ||
<span style="color: red;"><?php echo $lang['linklist']['nohtml']; ?></span> | ||
<?php } | ||
else { | ||
|
||
$description=str_replace("\n", '<br \>', $description); | ||
|
||
$file=str_replace(" ", "_", $title); | ||
$file=date ("dmY"). '-' . $file; | ||
|
||
$fp = fopen ('data/settings/modules/linklist/new/' . $file . '.php',"w"); | ||
fputs ($fp, '<?php'."\n" | ||
.'$sitename = "'.$title.'";'."\n" | ||
.'$sitelink = "'.$sitelink.'";'."\n" | ||
.'$post_content = "'.$description.'";'."\n" | ||
.''); | ||
fclose ($fp); | ||
|
||
$message = $lang['linklist']['mail']."<br><br>". | ||
$lang['linklist']['mail_tit'].'<br><b>'.$title."</b><br>". | ||
$lang['linklist']['mail_dis'].'<br>'.$description."<br>". | ||
$lang['linklist']['mail_lnk'].'<br><a href="'.$sitelink.'">'.$sitelink.'</a>'; | ||
|
||
mail ($site_email,$lang['linklist']['msubject'],$message,"From: ".$email." \n" . "Content-type: text/html; charset=utf-8"); | ||
|
||
echo $lang['linklist']['wsend']; | ||
|
||
} | ||
} | ||
} | ||
|
||
} | ||
|
||
function linklist_page_site_extern(){ | ||
global $lang; | ||
if (file_exists('data/settings/modules/linklist_settings.php')){ | ||
include ("data/settings/modules/linklist_settings.php"); | ||
} else { | ||
$disclaimer="You are leaving this page. Please note that I am not responsible for the content of the following site."; | ||
} | ||
|
||
$file=$_GET['link']; | ||
include ('data/settings/modules/linklist/'.$file); | ||
|
||
echo '<h2>'.$lang['linklist']['exhead'].'</h2> | ||
<p>'.$disclaimer.'</p> | ||
<p>'.$lang['linklist']['exredir'].' <a href="'.$sitelink.'">'.$sitelink.'</a></p>'; | ||
|
||
echo '<script type="text/javascript"> | ||
function Weiter() { | ||
window.open("'.$sitelink.'","_blank"); | ||
} | ||
setTimeout("Weiter()",5000); | ||
</script>'; | ||
|
||
} | ||
?> |