freetag minor fix for taglist and remove CDNs

This commit is contained in:
Ian 2014-10-02 11:13:40 +02:00
parent 6488381052
commit 719f251130
6 changed files with 31 additions and 23 deletions

View file

@ -1,7 +1,12 @@
3.59:
----
* Remove CDNs and upgrade jquery-migrate
* Minor fix for taglist
3.58:
----
* Fix doubled encoded umlaut taglinks by searchengines backlinks.
* Added a new option to allow showing taglink entries as a linklist.
* Fix doubled encoded umlaut taglinks by searchengines backlinks.
* Added a new option to allow showing taglink entries as a linklist.
This adds a 'taglist' tag as a reserved command to tags,
which not allows this tag as a normal tag any further.
The addition can be done either by the preset taglink as "/plugin/taglist/"

View file

@ -1,4 +1,4 @@
When using extended smarty output, the following code illustrates how the
When using extended smarty output, the following code illustrates how the
smarty-variables could be used when dropped into the entries.tpl:
{if isset($entry.freetag.extended) && $entry.freetag.extended == 1}
@ -8,7 +8,7 @@ smarty-variables could be used when dropped into the entries.tpl:
{$tag}
{/foreach}
</div>
{if $is_single_entry or $is_preview}
{$entry.freetag.related.description}
<ul class="serendipity_freeTag_related">
@ -27,10 +27,10 @@ smarty-variables could be used when dropped into the entries.tpl:
Using this subquery you can convert existing categories to tags:
INSERT INTO serendipity_entrytags (entryid, tag)
SELECT serendipity_entries.id, serendipity_category.category_name
FROM serendipity_entries, serendipity_category, serendipity_entrycat
WHERE serendipity_entrycat.entryid = serendipity_entries.id
INSERT INTO serendipity_entrytags (entryid, tag)
SELECT serendipity_entries.id, serendipity_category.category_name
FROM serendipity_entries, serendipity_category, serendipity_entrycat
WHERE serendipity_entrycat.entryid = serendipity_entries.id
AND serendipity_category.categoryid = serendipity_entrycat.categoryid;
[quoted from: http://pixelated-dreams.com/archives/229-Spring-Cleaning.html]
@ -55,7 +55,7 @@ foreach($rows AS $row) {
serendipity_db_escape_string($row['category_name'])
)
);
printf(
"Category '%s' added as Tag for Entry #%d, '%s'<br />\n",
htmlspecialchars($row['category_name']),

View file

@ -1,9 +1,9 @@
Using this subquery you can convert existing categories to tags:
INSERT INTO serendipity_entrytags (entryid, tag)
SELECT serendipity_entries.id, serendipity_category.category_name
FROM serendipity_entries, serendipity_category, serendipity_entrycat
WHERE serendipity_entrycat.entryid = serendipity_entries.id
INSERT INTO serendipity_entrytags (entryid, tag)
SELECT serendipity_entries.id, serendipity_category.category_name
FROM serendipity_entries, serendipity_category, serendipity_entrycat
WHERE serendipity_entrycat.entryid = serendipity_entries.id
AND serendipity_category.categoryid = serendipity_entrycat.categoryid;
[quoted from: http://pixelated-dreams.com/archives/229-Spring-Cleaning.html]
@ -28,7 +28,7 @@ foreach($rows AS $row) {
serendipity_db_escape_string($row['category_name'])
)
);
printf(
"Category '%s' added as Tag for Entry #%d, '%s'<br />\n",
htmlspecialchars($row['category_name']),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -72,7 +72,7 @@ class serendipity_event_freetag extends serendipity_event
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('version', '3.58');
$propbag->add('version', '3.59');
$propbag->add('event_hooks', array(
'frontend_fetchentries' => true,
'frontend_fetchentry' => true,
@ -702,9 +702,9 @@ class serendipity_event_freetag extends serendipity_event
case 'external_plugin':
$uri_parts = explode('?', str_replace(array('&amp;', '%FF'), array('&', '.'), $eventData));
$taglist = serendipity_db_bool($this->get_config('taglist', false));
$param = $taglist ? explode('/', str_replace('/taglist','',$uri_parts[0])) : explode('/', $uri_parts[0]);
$plugincode = array_shift($param);
$taglist = serendipity_db_bool($this->get_config('taglist', false));
$tagged_as_list = false;
// By option or manually added blogdomain.com/plugin/taglist/Serendipity/Blog/Plums - see below
@ -980,9 +980,9 @@ addLoadEvent(enableAutocomplete);
}
// jQuery Migrate is used due to $.browser of autocomplete plugin not being available in jquery 1.9+
echo '
' . ($serendipity['version'][0] < 2 ? '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>' : '') . '
' . ($serendipity['version'][0] < 2 ? '<script src="' . $serendipity['baseURL'] . 'plugins/serendipity_event_freetag/jquery-1.11.1.min.js" type="text/javascript"></script>' : '') . '
<link rel="stylesheet" type="text/css" href="' . $serendipity['baseURL'] . 'plugins/serendipity_event_freetag/jquery.autocomplete.css" />
<script src="https://code.jquery.com/jquery-migrate-1.1.1.js"></script>
<script src="' . $serendipity['baseURL'] . 'plugins/serendipity_event_freetag/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="' . $serendipity['baseURL'] . 'plugins/serendipity_event_freetag/jquery.autocomplete.min.js"></script>
<script type="text/javascript">
var tags = [' . implode(',', $wicktags) . '];
@ -995,7 +995,7 @@ addLoadEvent(enableAutocomplete);
matchContains: "word",
autoFill: false
})};
addLoadEvent(enableAutocomplete);
addLoadEvent(enableAutocomplete);
' : '') . '
</script>';
}
@ -1249,12 +1249,9 @@ addLoadEvent(enableAutocomplete);
return true;
}
// This falls into the default case, which returns false... Is this supposed to happen?
// Is it a bug?
// Is it a feature?
$this->displayEntry($eventData, $addData);
return true;
break; // Ian: shouldn't it break here? See upper question.
break;
case 'xmlrpc_updertEntry':
if (isset($eventData['id']) && isset($eventData['mt_keywords'])) {