Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahY committed Dec 25, 2011
1 parent 11a2a62 commit f561234
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 35 deletions.
1 change: 0 additions & 1 deletion ewiki/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@

#-- load plugins
// include("plugins/init.php"); # you can disable this later
include("plugins/page/README.php");
# include("plugins/pluginloader.php");
# include("plugins/email_protect.php");
include("plugins/page/powersearch.php");
Expand Down
18 changes: 11 additions & 7 deletions ewiki/ewiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
define("EWIKI_UP_PAGENUM", "n"); # _UP_ means "url parameter"
define("EWIKI_UP_PAGEEND", "e");
define("EWIKI_UP_BINARY", "binary");
define("EWIKI_UP_UPLOAD", "upload");
define("EWIKI_UP_UPLOAD", null);//"upload");
define("EWIKI_UP_PARENTID", "parent_page");
#- other stuff
define("EWIKI_DEFAULT_LANG", "en");
Expand Down Expand Up @@ -328,10 +328,11 @@
"EDIT_FORM_1" => "It is <a href=\"".EWIKI_SCRIPT."GoodStyle\">GoodStyle</a>
to just start writing. With <a href=\"".EWIKI_SCRIPT."WikiMarkup\">WikiMarkup</a>
you can style your text later.<br>",
"EDIT_FORM_2" => "<br>Please do not write things, which may make other
people angry. And please keep in mind that you are not all that
anonymous in the internet (find out more about your computers
'<a href=\"http://google.com/search?q=my+computers+IP+address\">IP address</a>' at Google).",
"EDIT_FORM_2" => "",
//~ <br>Please do not write things, which may make other
//~ people angry. And please keep in mind that you are not all that
//~ anonymous in the internet (find out more about your computers
//~ '<a href=\"http://google.com/search?q=my+computers+IP+address\">IP address</a>' at Google).",
"BIN_IMGTOOLARGE" => "Image file is too large!",
"BIN_NOIMG" => "This is no image file (inacceptable file format)!",
"FORBIDDEN" => "You are not authorized to access this page.",
Expand Down Expand Up @@ -1717,7 +1718,7 @@ function ewiki_control_links($id, &$data, $action, $hide_hr=0, $hide_mtime=0) {
}

$o = "\n"
. '<div align="right" class="action-links control-links">';
. '<div class="action-links control-links">';
if (!$hide_hr) {
$o .= "\n<br>\n" . "<hr noshade>" . "\n";
}
Expand Down Expand Up @@ -1745,7 +1746,9 @@ function ewiki_control_links($id, &$data, $action, $hide_hr=0, $hide_mtime=0) {
#-- the core of ewiki_control_links, separated for use in info and plugins
function ewiki_control_links_list($id, &$data, $action_links, $version=0) {
global $ewiki_plugins;


$o = '<div class="action-links-buttons">';

foreach ($action_links as $action => $title)
if (!empty($ewiki_plugins["action"][$action]) || !empty($ewiki_plugins["action_always"][$action]) || strpos($action, ":/"))
{
Expand All @@ -1758,6 +1761,7 @@ function ewiki_control_links_list($id, &$data, $action_links, $version=0) {
: ewiki_script($action, $id, $version?array("version"=>$version):NULL)
) . '">' . ewiki_t($title) . '</a> ';
}
$o .= '</div>';

return($o);
}
Expand Down
22 changes: 11 additions & 11 deletions ewiki/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@
-->
<?php

if(qa_get_logged_in_level()>=QA_USER_LEVEL_ADMIN) {
if(qa_get_logged_in_level()>=QA_USER_LEVEL_ADMIN && false) { // disabled

?>
<div class="rbr">
<b>database <A HREF="./tools/index.html">tools</A></b><br>
» <A HREF="./tools/t_flags.php">set page flags</A><BR>
» <A HREF="./tools/t_backup.php">backup util</A><BR>
» <A HREF="./tools/t_restore.php">restore util</A><BR>
» <A HREF="./tools/t_remove.php">page deletion</A><BR>
» <A HREF="./tools/t_holes.php">make holes</A><BR>
» <A HREF="./tools/t_convertdb.php">convert db</A><BR>
» <A HREF="./tools/t_checklinks.php">check links</A><BR>
<b>database <A HREF="./wiki/tools">tools</A></b><br>
» <A HREF="./wiki/tools/flags">set page flags</A><BR>
» <A HREF="./wiki/tools/backup">backup util</A><BR>
» <A HREF="./wiki/tools/restore">restore util</A><BR>
» <A HREF="./wiki/tools/remove">page deletion</A><BR>
» <A HREF="./wiki/tools/holes">make holes</A><BR>
» <A HREF="./wiki/tools/convertdb">convert db</A><BR>
» <A HREF="./wiki/tools/checklinks">check links</A><BR>
</div>
<?php

Expand All @@ -96,10 +96,10 @@
?>

<div class="rbr">
<b>internal pages</b><br>
<b>internal pages</b><ul>
<?php
foreach ($ewiki_plugins["page"] as $id=>$pf) {
echo '» <A HREF="' . ewiki_script("", $id) . '">' . $id . '</A><BR>' . "\n";
echo '<li><A HREF="' . ewiki_script("", $id) . '">' . $id . '</A></li>' . "\n";
}
?>
</div>
Expand Down
43 changes: 30 additions & 13 deletions qa-wiki-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,50 @@ function option_default($option) {
case 'wiki_page_css':
return '
#wiki_container .rbr {
font-family:"skaterdudes","steelfish","coolvetica","Arial","Helvetica","Lucida";
background-color:#ffbb44;
color:#221003;
padding:3px;
border-radius:12px 0px 0px 12px;
-moz-border-radius:12px 0px 0px 12px;
border:2px solid #000000; border-right:0px;
margin-top:8px;
float:right; clear:right;
background-color: #EEEEEE;
border-color: #777;
border-radius: 12px 0 0 12px;
border-style: solid none solid solid;
border-width: 2px 0 2px 2px;
clear: right;
color: #221003;
float: left;
margin-top: 8px;
padding: 6px;
}
#wiki_container .rbr a {
text-decoration:none;
}
#wiki_container .rbr ul {
list-style: none outside none;
padding:0;
}
#wiki_container .rbr li {
float:left;
padding:0 8px;
}
#wiki_container #wiki-main {
}
#wiki_container #wiki-main .action-links {
}
#wiki_container #wiki-main .action-links a {
padding:4px;
background-color: #EEE;
color:black;
text-decoration:none;
background-color: #EEEEEE;
border: 1px solid silver;
border-radius: 4px 4px 4px 4px;
color: black;
padding: 3px 8px;
text-decoration: none;
}
#wiki-main .action-links a:hover {
background-color: #EFEFEF !important;
}
#wiki-main .control-links {
text-align:left;
}
#wiki-main .action-links-buttons {
float:right;
}
';
default:
return null;
Expand Down
20 changes: 17 additions & 3 deletions qa-wiki-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,26 @@ function process_request($request)
include $request.($request == 'wiki'?'/index.php':'');
$contents = ob_get_contents();
ob_end_clean();
*/ global $ewiki_request;
*/
$tools = array(
'wiki/tools' => 'index.html',
'wiki/tools/flags' => 't_flags.php',
'wiki/tools/backup' => 't_backup.php',
'wiki/tools/restore' => 't_restore.php',
'wiki/tools/remove' => 't_remove.php',
'wiki/tools/holes' => 't_holes.php',
'wiki/tools/convertdb' => 't_convertdb.php',
'wiki/tools/checklinks' => 't_checklinks.php'
);

global $ewiki_request;
$ewiki_request = array_merge($_GET?$_GET:array(),$_POST?$_POST:array());
global $ewiki_links, $ewiki_plugins, $ewiki_ring, $ewiki_t, $ewiki_errmsg, $ewiki_data, $ewiki_title, $ewiki_id, $ewiki_action, $ewiki_config;

ob_start();
include("ewiki/index.php");
if(isset($tools[$request]))
include('ewiki/tools/'.$tools[$request]);
else
include("ewiki/index.php");
$contents = ob_get_contents();
ob_end_clean();

Expand Down

0 comments on commit f561234

Please sign in to comment.