CGblog How to force a specific category on fesubmit?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
netplan
New Member
New Member
Posts: 4
Joined: Sat Jul 13, 2013 7:07 am

CGblog How to force a specific category on fesubmit?

Post by netplan »

I am trying to let FEU post to CGBlog in a specific category

with the tag {CGBlog action="fesubmit" category="news"}

According to help, it should show only the category "news" but all categories are shown?

Also in the current default fesubmit template, if i choose any category that is not committed to database, the blog entry then has no category at all...

How do i force a specific category when using fesubmit ?

Regards Thomas

cmsms 1.11.10
FEU 1.23.2
CGBlog 1.12.1
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CGblog How to force a specific category on fesubmit?

Post by Dr.CSS »

Have you tried setting the General Blog Options > Default Category:..?
netplan
New Member
New Member
Posts: 4
Joined: Sat Jul 13, 2013 7:07 am

Re: CGblog How to force a specific category on fesubmit?

Post by netplan »

yes, but no category are set in database at all using the default fesubmit form
/Thomas.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CGblog How to force a specific category on fesubmit?

Post by calguy1000 »

CGBlog has no method to 'force' a specific category in the fesubmit form.

It has a few methods to specify 'default categories'. Though it looks like the method to specify the default category on the tag may have been broken in the last version. Not sure yet though as I have not tested.

If you want to FORCE a category you will have to modify your fesubmit template and replace the category inputs with a hidden field of the same name.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
netplan
New Member
New Member
Posts: 4
Joined: Sat Jul 13, 2013 7:07 am

Re: CGblog How to force a specific category on fesubmit?

Post by netplan »

okay any hints on how to do that ? - i dont understand how to replace the loop showing the full category tree.

This code part in fesubmit template

Code: Select all

{if isset($category_tree)}
	<div class="row">
	        {function do_category_tree depth=0}
                  {foreach $category_tree as $node}
                    {repeat string='&nbsp;&nbsp; ' times=$depth} <label><input type="checkbox" name="{$thename}" value="{$node.id}"> {$node.name}</label><br/>
                    {if isset($node.children)}{do_category_tree category_tree=$node.children depth=$depth+1}{/if}
                  {/foreach}
		{/function}
		<p class="col-md-4 text-right">{$categorytext}:</p>
		<p class="col-md-8" style="max-height: 8em; overflow-y: auto;">
		  {$thename=$actionid|cat:'cgblog_category_id'}
		  {do_category_tree}
                </p>
	</div>
	{/if}
should be replaced with something like

Code: Select all

<input type="hidden" name="{$actionid}cgblog_category_id" value="1"/> {* Force category 1 *}
but that does not Work.. How do i set current blog_id and my choosen category_id in cms_module_cgblog_blog_categories table in database ?

/Thomas
Post Reply

Return to “Modules/Add-Ons”