HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
SeoCompanion - If you use this plugin on vanilla 2.1
carried over from related:
for vanilla 2.1 try this, no guarantees but it may work for you, let us know.
change this in default.php
from
public function Base_Render_Before(&$Sender) { // CONFIGURATION - START $MetaDescriptionlimit = 20; // max. amount of words in the meta description. Should not be more than 50. $DefaultDescription= "Welcome to my Vanilla 2 Forum."; // Default Meta Description $DefaultTags = "forum vanilla"; // Default list of tags, blank space separated. // CONFIGURATION - END $Description = $Sender->Discussion->Body; if(strlen($Description)<1){ $Description = $DefaultDescription; } $Description = explode(' ', strip_tags($Description)); $Description = array_slice($Description,0,$MetaDescriptionlimit); $Description = implode(' ',$Description); $Sender->Head->AddTag('meta', array('name' => 'description', 'content'=>$Description)); $Keywords = $Sender->Discussion->Tags; if (count($Keywords)<1){ $Keywords = $DefaultTags; } $Keywords = explode(' ',$Keywords); $Keywords = implode(', ',$Keywords); $Sender->Head->AddTag('meta', array('name' => 'keywords', 'content'=>$Keywords)); }
to
public function Base_Render_Before($Sender) { // CONFIGURATION - START $MetaDescriptionlimit = 20; // max. amount of words in the meta description. Should not be more than 50. $DefaultDescription= "Welcome to my Vanilla 2 Forum."; // Default Meta Description $DefaultTags = "forum vanilla"; // Default list of tags, blank space separated. $Keywords = ""; $Description = $DefaultDescription; // CONFIGURATION - END $Controller = $Sender->ControllerName; if ($Controller == "discussioncontroller") { $Description = $Sender->Discussion->Body; } $Description = explode(' ', strip_tags($Description)); $Description = array_slice($Description,0,$MetaDescriptionlimit); $Description = implode(' ',$Description); $Sender->Head->AddTag('meta', array('name' => 'description', 'content'=>$Description)); if ($Controller == "discussioncontroller") { $Keywords = $Sender->Discussion->Tags; if (count($Keywords)<1){ $Keywords = $DefaultTags; } $Keywords = explode(' ',$Keywords); $Keywords = implode(', ',$Keywords); $Sender->Head->AddTag('meta', array('name' => 'keywords', 'content'=>$Keywords)); } }
the code could be cleaner - but the goal was to get rid of most of the errors, if not all in the shortest amount of time - 10 minutes
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Tagged:
6
Comments
@peregrine tried it but it didn't work for me. I still can't delete any discussion and my quote plugin is not working.