mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
0cc792d724
commit
bd7393ffa4
@ -138,6 +138,8 @@ class Text {
|
||||
* @return string
|
||||
*/
|
||||
public static function full_format($Str, $OutputTOC = true, $Min = 3) {
|
||||
global $Debug;
|
||||
$Debug->set_flag('BBCode start');
|
||||
$Str = display_str($Str);
|
||||
self::$Headlines = array();
|
||||
|
||||
@ -166,6 +168,7 @@ public static function full_format($Str, $OutputTOC = true, $Min = 3) {
|
||||
$HTML = self::parse_toc($Min) . $HTML;
|
||||
}
|
||||
|
||||
$Debug->set_flag('BBCode end');
|
||||
return $HTML;
|
||||
}
|
||||
|
||||
@ -277,6 +280,7 @@ private static function parse($Str) {
|
||||
$Len = strlen($Str);
|
||||
$Array = array();
|
||||
$ArrayPos = 0;
|
||||
$StrLC = strtolower($Str);
|
||||
|
||||
while ($i < $Len) {
|
||||
$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
|
||||
// (as the first close tag won't do - it's been opened again)
|
||||
do {
|
||||
$CloseTag = stripos($Str, "[/$TagName]", $CloseTag + 1);
|
||||
$CloseTag = strpos($StrLC, "[/$TagName]", $CloseTag + 1);
|
||||
if ($CloseTag === false) {
|
||||
$CloseTag = $Len;
|
||||
break;
|
||||
|
@ -523,6 +523,7 @@ public static function update_hash($GroupID) {
|
||||
|
||||
G::$Cache->delete_value("torrents_details_$GroupID");
|
||||
G::$Cache->delete_value("torrent_group_$GroupID");
|
||||
G::$Cache->delete_value("torrent_group_light_$GroupID");
|
||||
|
||||
$ArtistInfo = Artists::get_artist($GroupID);
|
||||
foreach ($ArtistInfo as $Importances => $Importance) {
|
||||
|
@ -399,9 +399,13 @@ function compare($X, $Y) {
|
||||
<div class="group_info clear">
|
||||
<strong><?=$DisplayName?></strong>
|
||||
<? 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 { ?>
|
||||
<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'] : '';
|
||||
Votes::vote_link($GroupID, $VoteType);
|
||||
|
@ -116,9 +116,13 @@ function compare($X, $Y) {
|
||||
<td colspan="5">
|
||||
<strong><?=$DisplayName?></strong>
|
||||
<? 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>
|
||||
</span>
|
||||
<? } 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>
|
||||
</span>
|
||||
<?
|
||||
}
|
||||
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>
|
||||
|
||||
<strong><?=$DisplayName?></strong> <?=$ExtraInfo?><? if ($Reported) { ?> - <strong class="torrent_label tl_reported">Reported</strong><? } ?>
|
||||
<span class="bookmark" style="float: right;">
|
||||
<?
|
||||
if ($IsBookmarked) {
|
||||
?>
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
||||
<? } else { ?>
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
|
||||
<? } ?>
|
||||
<span class="remove_bookmark float_right">
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="bookmarklink_torrent_<?=$GroupID?> brackets" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a>
|
||||
</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>
|
||||
</td>
|
||||
|
@ -219,9 +219,13 @@
|
||||
|
||||
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID, $UserVote);?>-->
|
||||
<? 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 { ?>
|
||||
<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>
|
||||
|
||||
|
@ -990,9 +990,13 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
||||
<div class="group_info clear">
|
||||
<?=$DisplayName?>
|
||||
<? 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 { ?>
|
||||
<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 />
|
||||
<div class="tags"><?=$TorrentTags->format('torrents.php?'.$Action.'&taglist=')?></div>
|
||||
|
@ -314,11 +314,13 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
||||
<? if ($Result['UnRead']) {
|
||||
echo '<strong class="new">New!</strong>';
|
||||
} ?>
|
||||
<span class="bookmark" style="float: right;">
|
||||
<? 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 { ?>
|
||||
<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>
|
||||
</div>
|
||||
|
@ -116,27 +116,16 @@ var ajax = {
|
||||
};
|
||||
//Bookmarks
|
||||
function Bookmark(type, id, newName) {
|
||||
if (window.location.pathname.indexOf('top10.php') != -1 || window.location.search.indexOf('?action=notify') != -1) {
|
||||
var oldName = $('#bookmarklink_' + type + '_' + id).raw().innerHTML;
|
||||
var bmLinks = $('#bookmarklink_' + type + '_' + id + ', .bookmarklink_' + type + '_' + id);
|
||||
var oldName = bmLinks.html();
|
||||
ajax.get("bookmarks.php?action=add&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).add_class('bookmarked');
|
||||
bookmarklinks[i].onclick = function() { Unbookmark(type, id, oldName); return false; };
|
||||
bookmarklinks[i].innerHTML = newName;
|
||||
bookmarklinks[i].title = 'Remove bookmark';
|
||||
}
|
||||
bmLinks.parent('.remove_bookmark, .add_bookmark').toggleClass('add_bookmark remove_bookmark');
|
||||
bmLinks.html(newName).attr('title', 'Remove bookmark').removeAttr('onclick').off('click').click(function() {
|
||||
Unbookmark(type, id, oldName);
|
||||
return false;
|
||||
});
|
||||
} 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) {
|
||||
if (window.location.pathname.indexOf('bookmarks.php') != -1) {
|
||||
@ -145,24 +134,15 @@ function Unbookmark(type, id, newName) {
|
||||
$('.groupid_' + 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 {
|
||||
var lnk = $('#bookmarklink_' + type + '_' + id).raw();
|
||||
var oldName = lnk.innerHTML;
|
||||
var bmLinks = $('#bookmarklink_' + type + '_' + id + ', .bookmarklink_' + type + '_' + id);
|
||||
var oldName = bmLinks.html();
|
||||
ajax.get("bookmarks.php?action=remove&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
||||
lnk.onclick = function() { Bookmark(type, id, oldName); return false; };
|
||||
lnk.innerHTML = newName;
|
||||
lnk.title = 'Add bookmark';
|
||||
bmLinks.parent('.remove_bookmark, .add_bookmark').toggleClass('add_bookmark remove_bookmark');
|
||||
bmLinks.html(newName).attr('title', 'Add bookmark').removeAttr('onclick').off('click').click(function() {
|
||||
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