view comments & add comment window section

This is the right place to report general bugs, make suggestions or ask for help.
dart
Posts: 58
Joined: Sun May 30, 2021 4:46 pm

Re: view comments & add comment window section

Post by dart » Wed Aug 04, 2021 11:18 pm

I was able to get the [more] to redirect to the page with comments.
by replacing #readmore-{$id} with 'comments' at both locations as shown below.
The 'comments' refer to the /comments prefix for the link.
Seems to be working tho - hopefully will not blow-up eventually.

This combined with Arvid's suggestion above seem to work fully for 'comments' at both levels. Heading wise & [read more] wise.

Code: Select all

	}

		if ($MODE == 'manual' || $MODE == 'semiauto') {
			if (($p = strpos($string, '[more]')) !== false) {
				return substr($string, 0, $p) . "<span class=\"readmore\"><a href=\"" . get_permalink($id) . "[color=#FF0000]comments[/color]\">" . $readmoreString . "</a></span>";
			}
		} elseif ($MODE == 'sentence') {
			$matches = array();
			if ($v = preg_match_all('|[.!?]\s|', $string, $matches, PREG_OFFSET_CAPTURE)) {
				if (count($matches [0]) > $CHOP_AT) {
					$string = substr($string, 0, $matches [0] [$CHOP_AT - 1] [1]) . ". <span class=\"readmore\"><a href=\"" . get_permalink($id) . "[color=#FF0000]comments[/color]\">" . $readmoreString . "</a></span>";
				}
			}
:D

dart
Posts: 58
Joined: Sun May 30, 2021 4:46 pm

Re: view comments & add comment window section

Post by dart » Thu Aug 05, 2021 12:50 pm

...and for last entries - direct view to page with comment window:

In 'plugin.lastentries.php'

Code: Select all

$string .= "<a href=\"{$link}\">{$entry['subject']}</a>
replace with

Code: Select all

$string .= "<a href=\"{$link}comments\">{$entry['subject']}</a>

Code: Select all

$string .= '<li>';
		$admin = BLOG_BASEURL . "admin.php?p=entry&amp;entry=";
		if (user_loggedin()) // if loggedin prints a "edit" link
			$string .= "<a href=\"{$admin}{$id}\">[" . $lang ['plugin'] ['lastentries'] ['edit'] . "]</a>";
		$string .= "<a href=\"{$link}\">{$entry['subject']}</a><br><br /></li>\n";


Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests