In case someone need to do this too, the correct commands are
// Remove the list of favorited posts from all users. db.objects.remove({_key: /^uid:\d+:favourites$/}) // Remove the list of users who favourited the post from all posts. db.objects.remove({_key: /^pid:\d+:users_favourited$/}) // Remove the favorite count from all posts. db.objects.updateMany({"_key":/post:[0-9]+/g},{$set: {reputation: 0}})How to remove/change the value for breadcrumbs after creating a new Topic?
-
I am using nodebb in an iframe for my application. The architecture of the application is such that I have to show a specific category topics only in any certain view. Therefore I cannot show users the breadcrumbs in the "Topic" view. I have overcome this problem by overriding
breadcrumbs.tpl
in following way:<!-- IF breadcrumbs.length --> <ol class="breadcrumb"> <!-- BEGIN breadcrumbs --> <li<!-- IF @last --> component="breadcrumb/current"<!-- ENDIF @last --> itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb" <!-- IF @last -->class="active"<!-- ENDIF @last -->> <!-- IF [email protected] --><a href="{breadcrumbs.url}" itemprop="url"><!-- ENDIF [email protected] --> <span itemprop="title"> {breadcrumbs.text} <!-- IF @last --> <!-- IF !feeds:disableRSS --> <!-- IF rssFeedUrl --><a target="_blank" href="{rssFeedUrl}"><i class="fa fa-rss-square"></i></a><!-- ENDIF rssFeedUrl --><!-- ENDIF !feeds:disableRSS --> <!-- ENDIF @last --> </span> <!-- IF [email protected] --></a><!-- ENDIF [email protected] --> </li> <!-- END breadcrumbs --> </ol> <!-- ENDIF breadcrumbs.length --> <!-- IF showCategoryLink --> <ol class="breadcrumb"> <li component="breadcrumb/current"itemscope="itemscope" > <a href="{config.relativePath}/embed?category_id={cid}" itemprop="url"> <span itemprop="title"> Go Back </s an> </a> </li> </ol> <!-- ENDIF breadcrumbsAlternateLink -->
and set the value for relevant variables (
breadcrumbs=null
andshowCategoryLink=true
by changing the controller forTopic.get
).But the problem occurs when a user creates a new topic. Upon creation, the user is redirected to the Topic View that he has just created, and there are thumbnails being shown in that view.
Is there anywhere that I can prevent those thumbnails from being shown? e.g.:
- by avoiding that redirection and just creating the topic,
- by using some plugin hook, If I could set the values for
breadcrumbs
andshowCategoryLink
as I want, or using theres
object, I could redirect user to the view that I have overridden (i.e./embed?category_id:<id>
).
-
Great . Exactly what I needed. Just couldn't find it in the documentation.