Embed Code seems not working, i used slug like this : :filter?/:slug?/
and i add Embed Code forum with : :slug , :slug? , :filter?/:slug?/ , forum/topic/:slug
all of them give same result, comment to all post
thanks
Last updated
rainlab.forum record ID parameter :slug? will be save as :slug?
this is dirty way how to keep using rainlab.forum for comment :
open rainlab/forum/components/EmbedTopic.php
go to line 80
if ($topic = TopicModel::forEmbed($channel, $code)->first()) {
$properties['slug'] = $slug;
}
change into :
if ($topic = TopicModel::forEmbed($channel, $lolslug)->first()) {
$properties['slug'] = $lolslug;
}
go to line 89
$this->controller->bindEvent('page.end', function() use ($component, $channel, $code)
change into
$this->controller->bindEvent('page.end', function() use ($component, $channel, $code, $lolslug)
go to line 91
$topic = TopicModel::createForEmbed($code, $channel, $this->page->title);
change into
$topic = TopicModel::createForEmbed($code, $channel, $this->page->title, $lolslug);
in line 58 under public function init() {
add
$urlarray = explode('/',Request::url());
$lolslug = $urlarray[(count($urlarray) - 1)];
add this on top under "use Exception;"
use Request;
open rainlab/forum/models/Topic.php
go to line 126
public static function createForEmbed($code, $channel, $subject = null)
change into
public static function createForEmbed($code, $channel, $subject = null, $lolslug = null)
go to line 132
$topic->embed_code = $code;
change into go to line 132
$topic->embed_code = $lolslug;
this one alternative for commenting use rainlab forum if u had better way to approach this, please let me know
Last updated
I encountered this error after applying your code:
Class 'RainLab\Forum\Components\Request' not found
I really really love that users in this community make an effort to problem solve and learn and code. Great post. Thanks for sharing!
laics19845002 said:
I encountered this error after applying your code:
Class 'RainLab\Forum\Components\Request' not found
sry just comeback from long holiday, did u add " use Request; " ?
ChadStrat said:
I really really love that users in this community make an effort to problem solve and learn and code. Great post. Thanks for sharing!
thanks Chad, i'm in love with your plugin too much :D
I have followed the instruction.
Now the error i encounter is "You cannot edit posts or make replies." when i add comment.
1-6 of 6