mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
Empty commit
This commit is contained in:
parent
0cc792d724
commit
bd7393ffa4
@ -138,6 +138,8 @@ class Text {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function full_format($Str, $OutputTOC = true, $Min = 3) {
|
public static function full_format($Str, $OutputTOC = true, $Min = 3) {
|
||||||
|
global $Debug;
|
||||||
|
$Debug->set_flag('BBCode start');
|
||||||
$Str = display_str($Str);
|
$Str = display_str($Str);
|
||||||
self::$Headlines = array();
|
self::$Headlines = array();
|
||||||
|
|
||||||
@ -166,6 +168,7 @@ public static function full_format($Str, $OutputTOC = true, $Min = 3) {
|
|||||||
$HTML = self::parse_toc($Min) . $HTML;
|
$HTML = self::parse_toc($Min) . $HTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$Debug->set_flag('BBCode end');
|
||||||
return $HTML;
|
return $HTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,6 +280,7 @@ private static function parse($Str) {
|
|||||||
$Len = strlen($Str);
|
$Len = strlen($Str);
|
||||||
$Array = array();
|
$Array = array();
|
||||||
$ArrayPos = 0;
|
$ArrayPos = 0;
|
||||||
|
$StrLC = strtolower($Str);
|
||||||
|
|
||||||
while ($i < $Len) {
|
while ($i < $Len) {
|
||||||
$Block = '';
|
$Block = '';
|
||||||
@ -393,7 +397,7 @@ private static function parse($Str) {
|
|||||||
// Every time we find an internal open tag of the same type, search for the next close tag
|
// Every time we find an internal open tag of the same type, search for the next close tag
|
||||||
// (as the first close tag won't do - it's been opened again)
|
// (as the first close tag won't do - it's been opened again)
|
||||||
do {
|
do {
|
||||||
$CloseTag = stripos($Str, "[/$TagName]", $CloseTag + 1);
|
$CloseTag = strpos($StrLC, "[/$TagName]", $CloseTag + 1);
|
||||||
if ($CloseTag === false) {
|
if ($CloseTag === false) {
|
||||||
$CloseTag = $Len;
|
$CloseTag = $Len;
|
||||||
break;
|
break;
|
||||||
|
@ -523,6 +523,7 @@ public static function update_hash($GroupID) {
|
|||||||
|
|
||||||
G::$Cache->delete_value("torrents_details_$GroupID");
|
G::$Cache->delete_value("torrents_details_$GroupID");
|
||||||
G::$Cache->delete_value("torrent_group_$GroupID");
|
G::$Cache->delete_value("torrent_group_$GroupID");
|
||||||
|
G::$Cache->delete_value("torrent_group_light_$GroupID");
|
||||||
|
|
||||||
$ArtistInfo = Artists::get_artist($GroupID);
|
$ArtistInfo = Artists::get_artist($GroupID);
|
||||||
foreach ($ArtistInfo as $Importances => $Importance) {
|
foreach ($ArtistInfo as $Importances => $Importance) {
|
||||||
|
@ -399,9 +399,13 @@ function compare($X, $Y) {
|
|||||||
<div class="group_info clear">
|
<div class="group_info clear">
|
||||||
<strong><?=$DisplayName?></strong>
|
<strong><?=$DisplayName?></strong>
|
||||||
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) { ?>
|
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) { ?>
|
||||||
<a style="float: right;" href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
<span class="remove_bookmark float_right">
|
||||||
|
<a style="float: right;" href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
||||||
|
</span>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<a style="float: right;" href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
<span class="add_bookmark float_right">
|
||||||
|
<a style="float: right;" href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
||||||
|
</span>
|
||||||
<? }
|
<? }
|
||||||
$VoteType = isset($UserVotes[$GroupID]['Type']) ? $UserVotes[$GroupID]['Type'] : '';
|
$VoteType = isset($UserVotes[$GroupID]['Type']) ? $UserVotes[$GroupID]['Type'] : '';
|
||||||
Votes::vote_link($GroupID, $VoteType);
|
Votes::vote_link($GroupID, $VoteType);
|
||||||
|
@ -116,9 +116,13 @@ function compare($X, $Y) {
|
|||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<strong><?=$DisplayName?></strong>
|
<strong><?=$DisplayName?></strong>
|
||||||
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) { ?>
|
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) { ?>
|
||||||
|
<span class="remove_bookmark float_right">
|
||||||
<a style="float: right;" href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
<a style="float: right;" href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
||||||
|
</span>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
|
<span class="add_bookmark float_right">
|
||||||
<a style="float: right;" href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
<a style="float: right;" href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
||||||
|
</span>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
Votes::vote_link($GroupID, $UserVote);
|
Votes::vote_link($GroupID, $UserVote);
|
||||||
|
@ -554,15 +554,17 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
|||||||
<span><a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets tooltip">DL</a></span>
|
<span><a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets tooltip">DL</a></span>
|
||||||
|
|
||||||
<strong><?=$DisplayName?></strong> <?=$ExtraInfo?><? if ($Reported) { ?> - <strong class="torrent_label tl_reported">Reported</strong><? } ?>
|
<strong><?=$DisplayName?></strong> <?=$ExtraInfo?><? if ($Reported) { ?> - <strong class="torrent_label tl_reported">Reported</strong><? } ?>
|
||||||
<span class="bookmark" style="float: right;">
|
|
||||||
<?
|
<?
|
||||||
if ($IsBookmarked) {
|
if ($IsBookmarked) {
|
||||||
?>
|
?>
|
||||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
<span class="remove_bookmark float_right">
|
||||||
<? } else { ?>
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="bookmarklink_torrent_<?=$GroupID?> brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
||||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
|
||||||
<? } ?>
|
|
||||||
</span>
|
</span>
|
||||||
|
<? } else { ?>
|
||||||
|
<span class="add_bookmark float_right">
|
||||||
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="bookmarklink_torrent_<?=$GroupID?> brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
||||||
|
</span>
|
||||||
|
<? } ?>
|
||||||
<div class="tags"><?=$TorrentTags->format()?></div>
|
<div class="tags"><?=$TorrentTags->format()?></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -219,9 +219,13 @@
|
|||||||
|
|
||||||
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID, $UserVote);?>-->
|
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID, $UserVote);?>-->
|
||||||
<? if ($IsBookmarked) { ?>
|
<? if ($IsBookmarked) { ?>
|
||||||
<span class="bookmark" style="float: right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets remove_bookmark" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a></span>
|
<span class="remove_bookmark float_right">
|
||||||
|
<a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
||||||
|
</span>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<span class="bookmark" style="float: right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets add_bookmark" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a></span>
|
<span class="add_bookmark float_right">
|
||||||
|
<a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
||||||
|
</span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<div class="tags"><?=$TorrentTags->format()?></div>
|
<div class="tags"><?=$TorrentTags->format()?></div>
|
||||||
|
|
||||||
|
@ -990,9 +990,13 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
|||||||
<div class="group_info clear">
|
<div class="group_info clear">
|
||||||
<?=$DisplayName?>
|
<?=$DisplayName?>
|
||||||
<? if (in_array($GroupID, $Bookmarks)) { ?>
|
<? if (in_array($GroupID, $Bookmarks)) { ?>
|
||||||
<span class="remove_bookmark float_right"><a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a></span>
|
<span class="remove_bookmark float_right">
|
||||||
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
||||||
|
</span>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<span class="add_bookmark float_right"><a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a></span>
|
<span class="add_bookmark float_right">
|
||||||
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
||||||
|
</span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<br />
|
<br />
|
||||||
<div class="tags"><?=$TorrentTags->format('torrents.php?'.$Action.'&taglist=')?></div>
|
<div class="tags"><?=$TorrentTags->format('torrents.php?'.$Action.'&taglist=')?></div>
|
||||||
|
@ -314,11 +314,13 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
|||||||
<? if ($Result['UnRead']) {
|
<? if ($Result['UnRead']) {
|
||||||
echo '<strong class="new">New!</strong>';
|
echo '<strong class="new">New!</strong>';
|
||||||
} ?>
|
} ?>
|
||||||
<span class="bookmark" style="float: right;">
|
|
||||||
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) { ?>
|
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) { ?>
|
||||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
<span class="remove_bookmark float_right">
|
||||||
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
||||||
|
</span>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
<span class="add_bookmark float_right">
|
||||||
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -116,26 +116,15 @@ var ajax = {
|
|||||||
};
|
};
|
||||||
//Bookmarks
|
//Bookmarks
|
||||||
function Bookmark(type, id, newName) {
|
function Bookmark(type, id, newName) {
|
||||||
if (window.location.pathname.indexOf('top10.php') != -1 || window.location.search.indexOf('?action=notify') != -1) {
|
var bmLinks = $('#bookmarklink_' + type + '_' + id + ', .bookmarklink_' + type + '_' + id);
|
||||||
var oldName = $('#bookmarklink_' + type + '_' + id).raw().innerHTML;
|
var oldName = bmLinks.html();
|
||||||
ajax.get("bookmarks.php?action=add&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
ajax.get("bookmarks.php?action=add&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
||||||
var bookmarklinks = $('#bookmarklink_' + type + '_' + id);
|
bmLinks.parent('.remove_bookmark, .add_bookmark').toggleClass('add_bookmark remove_bookmark');
|
||||||
for (var i = 0; i < bookmarklinks.results(); i++) {
|
bmLinks.html(newName).attr('title', 'Remove bookmark').removeAttr('onclick').off('click').click(function() {
|
||||||
$(bookmarklinks[i].parentNode.parentNode.parentNode).add_class('bookmarked');
|
Unbookmark(type, id, oldName);
|
||||||
bookmarklinks[i].onclick = function() { Unbookmark(type, id, oldName); return false; };
|
return false;
|
||||||
bookmarklinks[i].innerHTML = newName;
|
|
||||||
bookmarklinks[i].title = 'Remove bookmark';
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
});
|
||||||
var lnk = $('#bookmarklink_' + type + '_' + id).raw();
|
|
||||||
var oldName = lnk.innerHTML;
|
|
||||||
ajax.get("bookmarks.php?action=add&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
|
||||||
lnk.onclick = function() { Unbookmark(type, id, oldName); return false; };
|
|
||||||
lnk.innerHTML = newName;
|
|
||||||
lnk.title = 'Remove bookmark';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Unbookmark(type, id, newName) {
|
function Unbookmark(type, id, newName) {
|
||||||
@ -145,24 +134,15 @@ function Unbookmark(type, id, newName) {
|
|||||||
$('.groupid_' + id).remove();
|
$('.groupid_' + id).remove();
|
||||||
$('.bookmark_' + id).remove();
|
$('.bookmark_' + id).remove();
|
||||||
});
|
});
|
||||||
} else if (window.location.pathname.indexOf('top10.php') != -1 || window.location.search.indexOf('?action=notify') != -1) {
|
|
||||||
var oldName = $('#bookmarklink_' + type + '_' + id).raw().innerHTML;
|
|
||||||
ajax.get("bookmarks.php?action=remove&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
|
||||||
var bookmarklinks = $('#bookmarklink_' + type + '_' + id);
|
|
||||||
for (var i = 0; i < bookmarklinks.results(); i++) {
|
|
||||||
$(bookmarklinks[i].parentNode.parentNode.parentNode).remove_class('bookmarked');
|
|
||||||
bookmarklinks[i].onclick = function() { Bookmark(type, id, oldName); return false; };
|
|
||||||
bookmarklinks[i].innerHTML = newName;
|
|
||||||
bookmarklinks[i].title = 'Add bookmark';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
var lnk = $('#bookmarklink_' + type + '_' + id).raw();
|
var bmLinks = $('#bookmarklink_' + type + '_' + id + ', .bookmarklink_' + type + '_' + id);
|
||||||
var oldName = lnk.innerHTML;
|
var oldName = bmLinks.html();
|
||||||
ajax.get("bookmarks.php?action=remove&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
ajax.get("bookmarks.php?action=remove&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
||||||
lnk.onclick = function() { Bookmark(type, id, oldName); return false; };
|
bmLinks.parent('.remove_bookmark, .add_bookmark').toggleClass('add_bookmark remove_bookmark');
|
||||||
lnk.innerHTML = newName;
|
bmLinks.html(newName).attr('title', 'Add bookmark').removeAttr('onclick').off('click').click(function() {
|
||||||
lnk.title = 'Add bookmark';
|
Bookmark(type, id, oldName);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user