AjaxEditSupport-Talk

Summary: Talk page for AjaxEditSupport.
Maintainer: Esteve Boix
Users: +2 -1 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

PHP5.5 Compatibility Issue

M. Denning, 20170729: Ruleset is throwing the following compatibility error. Please, can this be addressed ASAP? Base site is battzion.org and WebMaster contact is at the bottom. Thanks!

ajax-pages  directives  B>>>=  ! file: /cookbook/ajaxeditsupport.php, line: 19, pat: /\(:ajaxeditsupport\s*(.*?):\)/ei
Update: I have updated line 19
FROM
Markup('ajax-pages', 'directives', '/\\(:ajaxeditsupport\\s*(.*?):\\)/ei', 
"Keep(FmtAjaxEditSupport('$pagename',PSS('$1')))");
TO
$debug=true;
if (!$debug){Markup('ajax-pages', 'directives', '/\\(:ajaxeditsupport\\s*(.*?):\\)/ei', 
"Keep(FmtAjaxEditSupport('$pagename',PSS('$1')))");}
else {Markup_e('ajax-pages', 'directives', '/\\(:ajaxeditsupport\\s*(.*?):\\)/i', 
"Keep(FmtAjaxEditSupport('$pagename',PSS($m[1])))");}
TakeAway:This seems to have taken away the error generated in Rule Table.
AfterThought:However, I would still be more comfortable if I obtained positive word
from the other developers that this was the only updated necessary.

Here is what can be done for the snippet to work with both PHP 5.5 and PHP 7.2:

Markup('ajax-pages', 'directives', '/\\(:ajaxeditsupport\\s*(.*?):\\)/i', 'MarkupAjaxEditSupport');
function MarkupAjaxEditSupport($m) {
  extract($GLOBALS["MarkupToHTML"]); # get $pagename
  return Keep(FmtAjaxEditSupport($pagename, $m[1]));
}

--Petko July 31, 2017, at 03:47 AM

Working with Other Forms

Hi, I'm wondering if this recipe can be set up to work with other PmWiki or PmForm forms. For example, the category list would be great along with the TagPages recipe. It doesn't even need to put the around the category names, just to populate the field so that tags are consistent between all the pages. Any tips on how to make it work with other recipes? Thank you!! XES July 08, 2014, at 05:07 AM

Hi! Thanks for your comments. For sure, I'm planning to update it, fairly soon. Tags are on my todo list :) Esteve. Oct, 19, 2014.

I've finally installed this on a very large Wiki. I would like to customize Group shortcuts in the Pages section. Otherwise it will always be 3 clicks to the links I need. I have 3 groups on my site that I will often be cross-referencing (some with hundreds of pages). So I'd like to be able to put shortcut links to the Blog, Main & podcast groups in the Pages section (I have to scroll through 15-20 groups or so with more groups on their way to find these 3 "hot" links). The template for this output is not in a variable I can change. This tweak would make the recipe more customizable for the site admin — and would work exactly like the Templates customization that already exists. In some cases the admin may want to remove the cross-referencing for the current group entirely (for example if a user is using this on their Profile page — and the admin doesn't want them to link to or even see other profiles in a group listing, but wants them to link to other pages) and give 1-click access to a specific group or list of groups. Thanks! XES September 06, 2017, at 06:40 AM
Requests: Reduce clicks, scrolling, and screen real estate:
  • live buttons & the option to turn the text links off - right now the icons are not live links. A simple switch/setting to turn the icons or text on/off.
  • Also would like to put the icons inline with the other PmWiki gui buttons.
  • Include a mouseover tooltip/label so that the button name comes up.
  • Attachments by group. When I click Attachments -> List Groups -> Group Name, I want to see all the attachments in that group with an option of seeing the list of pages in the group to view attachments for a specific page. I don't think of my attachments as belonging to specific pages, my wiki is set up to PmWiki default where attachments are uploaded into Group folders and easily linked within the group.
  • If Javascript can locate the lines for the top-level outline items I'd be very grateful. To give an idea of what I'm working with: http://www.kinhost.org/Main/ManualTOC - Just an idea of a real-world case where links, headlines, and tables aren't helpful :) PmWiki encourages "trails" like this. If you want I can give you an edit password. — Alternatively "Anchors" might be useful. Rather than linking to all the links in a page link to the in-page [[#anchors]].
  • Dictionary links and/or dictionary hot keys. I'd love to be able to jump in the Links listing (on any panel) to a specific letter of the alphabet. So when I'm in the drop-down list of results, and type "d" nothing happens. It would be amazing if typing 'd' went to the section starting with D :) -- barring that, a list A-Z across the top of the window would be delightful. As I have more blog posts, more podcast episodes and more "manual" (Main group) entries, more uploads, etc. this will become more vital. If it's an A-Z link list, perhaps have it fixed at the top of the pane so it doesn't scroll off and get lost. If the typing filtered the results (instead of jump-to) that would be amazing too. So it could be "search in results". Regardless, a faster way to cut through hundreds of results would be amazing.

So basically right now, I'm thinking this is more helpful on a small-to-medium sized site, and it's the large sites that really need it, if it were streamlined some. :) I'd make a derivative but I am not a javascript programmer :( I will try it out on a smaller site as well soon, and maybe have other feedback for you. XES September 06, 2017, at 07:23 AM

Major bug

Apparently enabling this recipe stops word-wrap in the browser edit textarea (Safari 10.1.2 & Chrome Version 60.0.3112.113). I didn't notice when editing a long list page, but the moment I was on a normal article/prose page it was obvious. Petko's fix above did not affect this behavior. XES September 06, 2017, at 07:45 AM

I went to the developer's site and tried pasting 3 long lorum-ipsum paragraphs into the test editor there: same issue with no word-wrap on paste, when I went to save it threw an error: "Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 87 bytes) in /usr/home/esteveb.com/web/pmwiki.php on line 970"

This is the lorum ipsum text I was pasting:

Claram anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Feugait nulla facilisi nam liber tempor cum soluta nobis. Nunc putamus parum eodem modo typi qui nunc, nobis videntur parum clari fiant sollemnes in. Nihil imperdiet doming id quod mazim placerat facer possim assum typi non habent claritatem insitam.

Consequat vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto. Lectorum mirum est notare quam littera gothica quam? Minim veniam quis nostrud, exerci tation ullamcorper suscipit lobortis nisl ut? Et quinta decima eodem modo typi, qui nunc nobis videntur parum clari fiant sollemnes in. Nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat ut wisi enim ad aliquip. Feugait nulla facilisi nam liber tempor cum soluta nobis. Iriure dolor in hendrerit in vulputate velit esse molestie odio dignissim qui blandit? Qui sequitur mutationem consuetudium nunc putamus parum claram anteposuerit litterarum formas humanitatis per seacula quarta decima.

Doming id quod mazim placerat facer possim assum? Quam littera gothica quam nunc putamus parum claram anteposuerit litterarum formas humanitatis per seacula quarta decima! Me lius quod ii legunt saepius claritas est etiam. Notare et quinta decima eodem modo typi qui.

XES October 08, 2017, at 07:26 AM

Talk page for the AjaxEditSupport recipe (users).