Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Meta-Description cut after line-break?
phreak
MVP
Hi all,
I use a crawler to determine which discussion pages have good and bad meta-description length. The result showed me that many descriptions are too short and are basically the greeting term "Hello!" or "Hi!".
My guess is that Vanilla now adds the Meta-Description to the Database until a certain number of sole of the initial post... but it seem to cut this length by every line break.
Anyone who understands that logically the same?
- VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
- VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Tagged:
0
Comments
The discussion pages uses the sliceParagraph function. This takes a string, a minimum length and returns a sentence that breaks on a paragraph. You can override this in your bootstrap: https://github.com/vanilla/vanilla/blob/d4c9bccedaa609f30c4df68bec44c6151e401feb/library/core/functions.general.php#L3333
You could instead increase the description max length by hooking into the discussion controller and resetting the description:
Adjust 350 to be something you like. 160 is the number used in the discussion controller normally.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Wow, thanx @hgtonight. I will dig into this.
see also https://github.com/vanilla/vanilla/pull/3484