Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Question Category Subscriptions - Default Subscribed?

More
15 years 6 months ago #63438 by DesoWV
Hi, I am looking forward to the Category Subscriptions, however I have one very important question.

Will it be possible to set Category Subscriptions by default for new all users? Also for the initial setup after the upgrade? Currently I am not seeing this in RC3?

Naturally they would be able to change their subscriptions if they want, but by default I need everyone subscribed. We use our forums as a mailing list to ensure everyone is up to date if they dont log into the website. But as noted, if they want to remove their subscriptions they can.

Thank You.

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #63448 by Matias
There's System - Kunena plugin that can be used for this when user registers. Unfortunately it needs some custom coding to get it to work. :(

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #63544 by DesoWV
Ok, found the plugin and looked in the Kunena.php file it points to, but I did not see anything in it to edit for category subscriptions, what code would need to be added? Is this not going to be a built in Kunena feature with the final release?

Also, I subscribed to this topic when I posted it, and I just now confirmed it in my profile, but I did not receive a email saying you replied?

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #63545 by Matias
Final version (1.6.0) will be out very soon. So no, there's no time to make it happen.

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #63547 by DesoWV
Ok, I am by no means a coder, but occasionally I get lucky and scramble things together. If anyone can help me that would be great, in the mean time I will "attempt" to edit the system - kunena plugin file and see if I can get it to auto subscribe new users to categories.

For this example to make it easy to locate the info I would need to change we will use the following info:
Category Name: KingKong
Category ID: 234987

Now, from my looking in the **/components/com_kunena/kunena.php file I located the following code which I believe is used to subscribe to a category:

lines 526-549
Code:
case 'subscribecat' : if (!JRequest::checkToken('get')) { $kunena_app->enqueueMessage ( JText::_ ( 'COM_KUNENA_ERROR_TOKEN' ), 'error' ); if ($userid == 0) { $kunena_app->redirect ( CKunenaLink::GetCategoryURL('showcat' , $catid, false ) ); } else { $kunena_app->redirect ( CKunenaLink::GetProfileURL($userid, false) ); } } $success_msg = ''; if ( $catid && $kunena_my->id ) { $query = "INSERT INTO #__kunena_subscriptions_categories (catid, userid) VALUES ('$catid','$kunena_my->id')"; $kunena_db->setQuery ( $query ); if (@$kunena_db->query () && $kunena_db->getAffectedRows () == 1) { $success_msg = JText::_('COM_KUNENA_GEN_CATEGORY_SUBCRIBED'); } KunenaError::checkDatabaseError(); } $kunena_app->redirect ( CKunenaLink::GetCategoryURL('showcat' , $catid, false ), $success_msg ); break;

How would this be edited and placed into the system - kunena plugin file (**/plugins/system/kunena.php) ?? I will work on it and if I happen to stumble across it I will post the solution here. In the mean time I am reaching out for help. :silly:

Thanks a ton!

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago - 15 years 6 months ago #63549 by DesoWV
Ok, so I did quite a bit of research and came to the conclusion that if I did:
Code:
$query="INSERT INTO jos_kunena_subscriptions_categories VALUES ('234987','325')";

it would work, however it did not.... note I did use a real category ID but reguardless if I had not it still should have put it in the mysql table, which it did not.

So I then went as far as to do a complete login to the database (yes I changed the values to real values), and this still did not work. For the life of me I can not seem to get ANYTHING to insert into the table.... wth????
Code:
$username="username"; $password="password"; $database="database"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="INSERT INTO jos_kunena_subscriptions_categories VALUES ('234987','325')"; mysql_query($query); mysql_close();

of course I am able to manually enter values into the table, so that will solve my migration issue, but I still need it to automatically add new users.

Any of you coding gods have an idea???

Thanks!
Last edit: 15 years 6 months ago by DesoWV. Reason: forgot to change a value to the demo values.... ops!

Please Log in or Create an account to join the conversation.

Time to create page: 0.275 seconds