Skip to content

Commit

Permalink
Viscacha 0.8 Gold
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Oct 23, 2014
1 parent 3480ae7 commit 5e2d808
Show file tree
Hide file tree
Showing 167 changed files with 7,032 additions and 5,247 deletions.
31 changes: 10 additions & 21 deletions _docs/readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################
# Readme for Viscacha 0.8 RC 7 #
# Readme for Viscacha 0.8 Gold #
########################################

== Table of Contents ==
Expand Down Expand Up @@ -41,9 +41,9 @@ Warning: Since 0.8 RC7 we provide separate packages for installation
6. After the update is ready and you are back in your Admin Control
Panel, please check for updates of your installed packages!

Note: You can only update from Viscacha 0.8 RC5 and 0.8 RC6.
Note: You can only update from Viscacha 0.8 RC5, 0.8 RC6 and 0.8 RC7.

== 2.1 == Stylesheet Changes (only RC6 to RC7) ==
== 2.1 == Stylesheet Changes (only 0.8 RC7 to 0.8 Gold) ==
This changes are for later design updates that are not installed while
updating. This steps will be shown or executed in the update script!

Expand All @@ -56,38 +56,27 @@ styles.

1. Search:
------------------------------------------------------------------------
hr {
height: 1px;
border: 0;
border-bottom: 1px #839FBC solid;
}
.popup {
------------------------------------------------------------------------

Add below:
------------------------------------------------------------------------
tt {
font-family: 'Courier New', monospace;
}
overflow: hidden;
------------------------------------------------------------------------


== System requirements ==

Minimum system requirements:
- PHP Version: 5.0.0 and above
(4.3.0 or higher may work, but is unsupported as of 0.8 RC7)
(PHP 4 is unsupported as of 0.8 RC7)
- PHP-Extensions: mysql or mysqli, pcre, gd, zlib
- MySQL Version: 4.0 and above

Normal system requirements:
- PHP Version: 5.0.0 and above
- PHP-Extensions: mysql or mysqli, pcre, gd, zlib, xml, mime_magic
- MySQL Version: 4.1 and above

Optimal system requirements:
- PHP Version: 5.2.0 and above
Recommended system requirements:
- PHP Version: 5.2.0 and above, 5.3.0 on Windows
- PHP-Extensions: mysql or mysqli, pcre, gd, zlib, xml, mime_magic,
mbstring, sockets, xdiff
mbstring, sockets, xdiff, ftp
- MySQL Version: 5.0 and above (Strict mode off)

If you are testing Viscacha, please give me some feedback how Viscacha
Expand All @@ -100,7 +89,7 @@ Following information are useful for me:
- MySQL version (strict mode enabled?)
- PHP version
- Status of the extensions: mysql, mysqli, pcre, gd, zlib, xml,
mime_magic, mbstring, sockets, xdiff
mime_magic, mbstring, sockets, xdiff, ftp
- The following settings in the file php.ini:
- safe_mode
- magic_quotes_gpc
Expand Down
35 changes: 26 additions & 9 deletions addreply.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
}

get_headboards($fc, $last);
$topforums = get_headboards($fc, $last, true);
$breadcrumb->Add($last['name'], "showforum.php?id=".$last['id'].SID2URL_x);
$breadcrumb->Add($prefix.$info['topic'], 'showtopic.php?id='.$id.SID2URL_x);
$breadcrumb->Add($lang->phrase('addreply_title'));
Expand Down Expand Up @@ -257,13 +257,27 @@

$lang_dir = $lang->getdir(true);
// ToDo: Send only one notification on more than one answer
$result = $db->query("
SELECT t.id, t.topic, u.name, u.mail, u.language
FROM {$db->pre}abos AS a
LEFT JOIN {$db->pre}user AS u ON u.id = a.mid
LEFT JOIN {$db->pre}topics AS t ON t.id = a.tid
WHERE a.type = '' AND a.tid = '{$id}' AND a.mid != '{$my->id}'
");
if ($config['multiple_instant_notifications'] == 1) {
$notification_query = "
SELECT t.id, t.topic, u.name, u.mail, u.language
FROM {$db->pre}abos AS a
LEFT JOIN {$db->pre}user AS u ON u.id = a.mid
LEFT JOIN {$db->pre}topics AS t ON t.id = a.tid
WHERE a.type = '' AND a.tid = '{$id}' AND a.mid != '{$my->id}'
";
}
else {
$notification_query = "
SELECT t.id, t.topic, u.name, u.mail, u.language, COUNT(*) AS num
FROM {$db->pre}abos AS a
LEFT JOIN {$db->pre}user AS u ON u.id = a.mid
LEFT JOIN {$db->pre}topics AS t ON t.id = a.tid
INNER JOIN {$db->pre}replies AS r ON r.topic_id = t.id AND r.date >= u.lastvisit
WHERE a.type = '' AND a.tid = '{$id}' AND a.mid != '{$my->id}'
GROUP BY t.id HAVING num = 1
";
}
$result = $db->query($notification_query);
while ($row = $db->fetch_assoc($result)) {
$lang->setdir($row['language']);
$data = $lang->get_mail('digest_s');
Expand All @@ -287,10 +301,13 @@
if ($close == 1 && $my->vlogin) {
$my->mp = $slog->ModPermissions($info['board']);
if ($my->mp[0] == 1) {
$db->query("UPDATE {$db->pre}topics SET status = '1' WHERE id = '".$info['id']."'");
$db->query("UPDATE {$db->pre}topics SET status = '1' WHERE id = '{$info['id']}'");
}
}

// Set topic read
$slog->setTopicRead($info['id'], $topforums);

($code = $plugins->load('addreply_save_end')) ? eval($code) : null;

ok($lang->phrase('data_success'),"showtopic.php?id={$id}&action=last".SID2URL_x);
Expand Down
5 changes: 2 additions & 3 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
if (empty($config['cryptkey']) || empty($config['database']) || empty($config['dbsystem'])) {
trigger_error('Viscacha is currently not installed. How to install Viscacha is described in the file "_docs/readme.txt"!', E_USER_ERROR);
}
if (empty($config['dbpw']) || empty($config['dbuser'])) {
if ((empty($config['dbpw']) || empty($config['dbuser'])) && $config['local_mode'] == 0) {
trigger_error('You have specified database authentification data that is not safe. Please change your database user and the database password!', E_USER_ERROR);
}

Expand Down Expand Up @@ -113,6 +113,7 @@
}
elseif ($action == 'locate') {
$url = $gpc->get('url', none);
$url = addslashes($url);
if (!empty($url)) {
$db->close();
sendStatusCode(307, $url);
Expand Down Expand Up @@ -150,8 +151,6 @@
error('index.php'.SID2URL_1, $lang->phrase('admin_not_allowed_to_view_this_page'));
}

include("classes/function.flood.php");

$addr = rawurldecode($gpc->get('addr', none));
if ($action == "login2") {
$log_status = $slog->sid_login(true);
Expand Down
104 changes: 59 additions & 45 deletions admin/cms.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function BBCodeToolBox($id, $content = '', $taAttr = '') {
<?php } ?>
<img src="templates/editor/images/seperator.gif" alt="" />
<?php if (count($smileys[0]) > 0) { ?>
<a id="menu_bbsmileys_<?php echo $id; ?>" href="#" onmouseover="RegisterMenu('bbsmileys_<?php echo $id; ?>');" class="editor_toolbar_dropdown"><img src="<?php echo $tpl->img('desc'); ?>" alt="<?php echo $lang->phrase('box_collapse'); ?>" /> <?php echo $lang->phrase('more_smileys'); ?></a>
<a id="menu_bbsmileys_<?php echo $id; ?>" href="#" onmouseover="RegisterMenu('bbsmileys_<?php echo $id; ?>');" class="editor_toolbar_dropdown"><img src="<?php echo $tpl->img('desc'); ?>" alt="" /> <?php echo $lang->phrase('more_smileys'); ?></a>
<div class="popup" id="popup_bbsmileys_<?php echo $id; ?>">
<strong><?php echo $lang->phrase('more_smileys'); ?></strong>
<ul class="bbsmileys">
Expand Down Expand Up @@ -377,23 +377,6 @@ function getNavTitle() {
$pos = parseNavPosSetting();

$groups = $db->query("SELECT id, name FROM {$db->pre}groups");

if ($data['sub'] > 0) {
$result = $db->query("SELECT id, name, sub, position FROM {$db->pre}menu WHERE module = '0' ORDER BY position, ordering, id");
$cache = array(0 => array());
while ($row = $db->fetch_assoc($result)) {
if (!isset($cache[$row['sub']]) || !is_array($cache[$row['sub']])) {
$cache[$row['sub']] = array();
}
$cache[$row['sub']][] = $row;
}
}

if ($data['module'] > 0) {
$plugs = $db->query("SELECT * FROM {$db->pre}plugins WHERE position = 'navigation' ORDER BY ordering");
}

$last = null;
?>
<form name="form" method="post" action="admin.php?action=cms&job=nav_edit2&id=<?php echo $id; ?>">
<table class="border" border="0" cellspacing="0" cellpadding="4" align="center">
Expand All @@ -404,7 +387,17 @@ function getNavTitle() {
<td class="mbox" width="50%"><?php echo $lang->phrase('admin_cms_nav_title'); ?><br /><span class="stext"><?php echo $lang->phrase('admin_cms_nav_title_text'); ?></span></td>
<td class="mbox" width="50%"><input type="text" name="title" size="40" value="<?php echo $data['name']; ?>" /></td>
</tr>
<?php if ($data['sub'] > 0) { ?>
<?php
if ($data['sub'] > 0) {
$result = $db->query("SELECT id, name, sub, position FROM {$db->pre}menu WHERE module = '0' ORDER BY position, ordering, id");
$cache = array(0 => array());
while ($row = $db->fetch_assoc($result)) {
if (!isset($cache[$row['sub']]) || !is_array($cache[$row['sub']])) {
$cache[$row['sub']] = array();
}
$cache[$row['sub']][] = $row;
}
?>
<tr>
<td class="mbox" width="50%"><?php echo $lang->phrase('admin_cms_nav_file_url'); ?><br />
<span class="stext">
Expand All @@ -422,6 +415,7 @@ function getNavTitle() {
<td class="mbox" width="50%">
<select name="sub">
<?php
$last = null;
foreach ($cache[0] as $row) {
if ($last != $row['position']) {
if ($last != null) {
Expand All @@ -444,7 +438,11 @@ function getNavTitle() {
</select>
</td>
</tr>
<?php } if ($data['module'] > 0) { ?>
<?php
}
if ($data['module'] > 0) {
$plugs = $db->query("SELECT * FROM {$db->pre}plugins WHERE position = 'navigation' ORDER BY ordering");
?>
<tr>
<td class="mbox" width="50%"><?php echo $lang->phrase('admin_cms_nav_plugin'); ?></td>
<td class="mbox" width="50%">
Expand All @@ -455,6 +453,33 @@ function getNavTitle() {
</select>
</td>
</tr>
<?php
}
if ($data['sub'] == 0) {
$sort = $db->query("SELECT id, name, position FROM {$db->pre}menu WHERE sub = '0' ORDER BY position, ordering, id");
?>
<tr>
<td class="mbox" width="50%"><?php echo $lang->phrase('admin_cms_nav_sort_in_after'); ?></td>
<td class="mbox" width="50%">
<select name="sort">
<?php
$last = null;
while ($row = $db->fetch_assoc($sort)) {
if ($last != $row['position']) {
if ($last != null) {
echo '</optgroup>';
}
$last = $row['position'];
echo '<optgroup label="'.htmlspecialchars($pos[$last], ENT_QUOTES).'">';
unset($pos[$last]);
}
echo '<option value="'.$row['id'].'"'.iif($row['id'] == $data['id'], ' selected="selected"').'>'.$plugins->navLang($row['name'], true).'</option>';
}
?>
</optgroup>
</select>
</td>
</tr>
<?php } ?>
<tr>
<td class="mbox" width="50%"><?php echo $lang->phrase('admin_cms_nav_groups'); ?><br /><span class="stext"><?php echo $lang->phrase('admin_cms_nav_groups_text'); ?></span></td>
Expand Down Expand Up @@ -507,6 +532,13 @@ function getNavTitle() {
$db->query("UPDATE {$db->pre}menu SET name = '{$title}', link = '{$url}', param = '{$target}', groups = '{$groups}', sub = '{$sub}', active = '{$active}', position = '{$pos['position']}' WHERE id = '{$id}' LIMIT 1");
}
else {
$sort = $gpc->get('sort', int);
$result = $db->query("SELECT id, ordering, position FROM {$db->pre}menu WHERE id = '{$sort}'");
$sort = $db->fetch_assoc($result);
if ($sort['id'] > $id) {
$sort['ordering']++;
}
$module_sql = '';
if ($data['module'] > 0) {
$plug = $gpc->get('plugin', int);
$result = $db->query("SELECT position FROM {$db->pre}plugins WHERE id = '{$plug}'");
Expand All @@ -517,11 +549,8 @@ function getNavTitle() {
// Do not do that anymore, because it may be required
// $db->query("UPDATE {$db->pre}plugins SET active = '{$active}' WHERE id = '{$plug}' LIMIT 1");
}
$db->query("UPDATE {$db->pre}menu SET name = '{$title}', groups = '{$groups}', active = '{$active}'{$module_sql} WHERE id = '{$id}' LIMIT 1");
}
else {
$db->query("UPDATE {$db->pre}menu SET name = '{$title}', groups = '{$groups}', active = '{$active}' WHERE id = '{$id}' LIMIT 1");
}
$db->query("UPDATE {$db->pre}menu SET name = '{$title}', groups = '{$groups}', active = '{$active}', ordering = '{$sort['ordering']}', position = '{$sort['position']}' {$module_sql} WHERE id = '{$id}'");
}
$delobj = $scache->load('modules_navigation');
$delobj->delete();
Expand Down Expand Up @@ -883,13 +912,6 @@ function getNavTitle() {
}
echo '<option value="'.$row['id'].'">'.$plugins->navLang($row['name'], true).'</option>';
}
foreach ($pos as $key => $name) {
?>
</optgroup>
<optgroup label="<?php echo htmlspecialchars($name, ENT_QUOTES); ?>">
<option value="pos_<?php echo $key; ?>">&lt;<?php echo $lang->phrase('admin_cms_nav_sort_in_here'); ?>&gt;</option>
<?php
}
?>
</optgroup>
</select>
Expand Down Expand Up @@ -917,18 +939,10 @@ function getNavTitle() {
if (empty($title)) {
error('admin.php?action=cms&job=nav_addbox', $lang->phrase('admin_cms_err_no_title'));
}
$sort = $gpc->get('sort', str);
if (substr($sort, 0, 4) == 'pos_') {
$sort = array(
'ordering' => 0,
'position' => substr($sort, 4)
);
}
else {
$sort = $gpc->save_int($sort);
$result = $db->query("SELECT ordering, position FROM {$db->pre}menu WHERE id = '{$sort}'");
$sort = $db->fetch_assoc($result);
}
$sort = $gpc->get('sort', int);
$result = $db->query("SELECT ordering, position FROM {$db->pre}menu WHERE id = '{$sort}'");
$sort = $db->fetch_assoc($result); // Keine Erhöhung des Prioritätswerts nötig, da ID der neuen Box > ID gewählten Box

$groups = $gpc->get('groups', arr_int);
$result = $db->query('SELECT COUNT(*) FROM '.$db->pre.'groups');
$count = $db->fetch_num($result);
Expand Down Expand Up @@ -1020,15 +1034,15 @@ function getNavTitle() {
<td><?php echo $lang->phrase('admin_wysiwyg_bgcolor'); ?></td>
<td>
<input type="text" name="backgroundcolor" id="backgroundcolor" value="none">
<input type="button" value="Choose" onClick="WYSIWYG_ColorInst.choose('backgroundcolor');" />
<input type="button" value="<?php echo $lang->phrase('admin_wysiwyg_choose'); ?>" onClick="WYSIWYG_ColorInst.choose('backgroundcolor');" />
</td>
</tr><tr class="mbox">
<td><?php echo $lang->phrase('admin_wysiwyg_border_width'); ?></td>
<td><input type="text" size="4" id="borderwidth" name="borderwidth" value="0" />px</td>
<td><?php echo $lang->phrase('admin_wysiwyg_border_color'); ?></td>
<td>
<input type="text" name="bordercolor" id="bordercolor" value="none">
<input type="button" value="Choose" onClick="WYSIWYG_ColorInst.choose('bordercolor');" />
<input type="button" value="<?php echo $lang->phrase('admin_wysiwyg_choose'); ?>" onClick="WYSIWYG_ColorInst.choose('bordercolor');" />
</td>
</tr><tr class="mbox">
<td><?php echo $lang->phrase('admin_wysiwyg_border_style'); ?></td>
Expand Down
18 changes: 18 additions & 0 deletions admin/data/hooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ attachments.php
-attachments_upload_form_end

components.php
-component_viscacha_addreply_last_replies
-component_viscacha_document_on_portal
-component_viscacha_help_legends
-component_viscacha_news_boxes
-component_viscacha_personal_panels
-component_viscacha_quick_reply
-component_viscacha_recent_topics
-component_viscacha_related_topics
-component_viscacha_who_is_online

cron.php
-cron_start
Expand Down Expand Up @@ -415,6 +424,15 @@ admin/packages.php
-admin_packages_jobs

admin/packages_admin.php
-admin_component_viscacha_addreply_last_replies
-admin_component_viscacha_document_on_portal
-admin_component_viscacha_help_legends
-admin_component_viscacha_news_boxes
-admin_component_viscacha_personal_panels
-admin_component_viscacha_quick_reply
-admin_component_viscacha_recent_topics
-admin_component_viscacha_related_topics
-admin_component_viscacha_who_is_online

admin/posts.php
-admin_posts_jobs
Expand Down
Loading

0 comments on commit 5e2d808

Please sign in to comment.