Post formatting questions

11 Replies, 1845 Views

(2018-07-01, 01:24 PM)Laird Wrote: Have found a more general solution than the one above for lists - it can be applied to videos too.

Turns out there was no need for a general solution, and the fix for videos was very simple: add second (value: 1) and third (value: 0) parameters to the call $templates->get("video_{$video}_embed") in the eval() on the second-to-last line of postParser::mycode_parse_video() in inc/class_parser.php, so that the entire line becomes:

PHP Code:
        eval("\$video_code = \"".$templates->get("video_{$video}_embed"10)."\";"); 

(2018-07-01, 05:13 PM)Laird Wrote: Well, I can fix the video problem, although as I said the fix would "break" posts that have been using a workaround (removing blank lines) for the problem. Maybe though I can code a little tool to reinsert blank lines where necessary in existing posts after applying the fix, to minimise the breakage.

I ended up writing that tool, and I've just run it on the live database. The posts it has modified are as follows in case anybody wants to check that it hasn't made a mess of their posts:
(This post was last modified: 2018-07-04, 12:41 AM by Laird.)
[-] The following 3 users Like Laird's post:
  • Ninshub, Typoz, Doug
Wow. Well done as always, Laird.
(This post was last modified: 2018-07-04, 01:07 AM by Ninshub.)
[-] The following 3 users Like Ninshub's post:
  • Typoz, Laird, Doug

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)