Codoforum related discussions
Codoforum Login Requests and index requests

I have a few questions on how I would do this:

  1. How do I make the login and registration a dropdown or popup so it doesn't redirect you to new page to login/register?
  2. How do I make it so when you login you don't get redirected to your profile? And when you register it should be a page for confirming your email. A login for the first time could redirect you to the profile but after that, it just logs you in and stays on the index.
  3. Is there any way to upgrade the catch to the new nocaptcha recaptha? I don't like the old recaptcha.
  4. Finally, I don't want the home page to show all recent posts. I want it to show announcements that only certain groups can post. Just like the Xenforo.

The first three are the most important but the 4th one would be great! I hope it is possible to do this. And I can wait until sticky and locked posts are available.

I have a few questions on how I would do this: 1. How do I make the login and registration a dropdown or popup so it doesn't redirect you to new page to login/register? 2. How do I make it so when you login you don't get redirected to your profile? And when you register it should be a page for confirming your email. A login for the first time could redirect you to the profile but after that, it just logs you in and stays on the index. 3. Is there any way to upgrade the catch to the new nocaptcha recaptha? I don't like the old recaptcha. 4. Finally, I don't want the home page to show all recent posts. I want it to show announcements that only certain groups can post. Just like the Xenforo. The first three are the most important but the 4th one would be great! I hope it is possible to do this. And I can wait until sticky and locked posts are available.
edited May 3 '15 at 4:28 am

Hi,

Your changes requires lot of code customization .

Do you have knowledge in HTML, javascript and PHP ?

Hi, Your changes requires lot of code customization . Do you have knowledge in HTML, javascript and PHP ?

@adesh
I personally do not. However, I am learning. If this is too much to ask for, I would be okay with just having one topic like Announcements on the home page. I just don't want all topics. That's the most important thing. All of the other ones are not that big of a deal, they are just suggestions.

@adesh I personally do not. However, I am learning. If this is too much to ask for, I would be okay with just having one topic like Announcements on the home page. I just don't want all topics. That's the most important thing. All of the other ones are not that big of a deal, they are just suggestions.

How do I make it so when you login you don't get redirected to your profile? And when you register it should be a page for confirming your email. A login for the first time could redirect you to the profile but after that, it just logs you in and stays on the index

Hi @typad1 ,

I have a same issue with you. When a user log in, I want he/she goes to index page instead of profile page.
Here is my code:

Edit file
codoforum\sites\default\themes\default\templates\user\login.tpl
from
window.location.href = codo_defs.url + 'user/profile';
to
window.location.href = codo_defs.url;

> How do I make it so when you login you don't get redirected to your profile? And when you register it should be a page for confirming your email. A login for the first time could redirect you to the profile but after that, it just logs you in and stays on the index Hi @typad1 , I have a same issue with you. When a user log in, I want he/she goes to index page instead of profile page. Here is my code: Edit file `codoforum\sites\default\themes\default\templates\user\login.tpl ` from ` window.location.href = codo_defs.url + 'user/profile'; ` to ` window.location.href = codo_defs.url; `
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Thank you so much! @nguoianphu

Is there a way so that the only topic that shows up in the index is the category I set it to? For example, I want the front page to only show posts in the announcements category.. is this possible?

@adesh

Thank you so much! @nguoianphu Is there a way so that the only topic that shows up in the index is the category I set it to? For example, I want the front page to only show posts in the announcements category.. is this possible? @adesh

Hi,

@typad1 , it is possible.

Open codoforum/sys/CODOF/Forum/Topic.php

In the method get_all_topics(), around line 129,

Replace

. 'WHERE t.topic_status=1 '

with

. 'WHERE t.topic_status=1 AND t.cat_id= 3 '

Here, 3 is a dummy cateogry id . You need to find the category id of the category whose topics you want to show.

You can find the category id by looking at the table codo_categories in the database.

Hi, @typad1 , it is possible. Open codoforum/sys/CODOF/Forum/Topic.php In the method get_all_topics(), around line 129, Replace ``` . 'WHERE t.topic_status=1 ' ``` with ``` . 'WHERE t.topic_status=1 AND t.cat_id= 3 ' ``` Here, 3 is a dummy cateogry id . You need to find the category id of the category whose topics you want to show. You can find the category id by looking at the table codo_categories in the database.

Great! Thank you so much @adesh !

My final question is if it is possible to upgrade to the noCaptcha reCaptcha for registration? I like the new one so much better than the original one.

@adesh

Great! Thank you so much @adesh ! My final question is if it is possible to upgrade to the noCaptcha reCaptcha for registration? I like the new one so much better than the original one. @adesh
edited May 9 '15 at 4:16 pm

@adesh Does the new update changes the way to only show the 'Announcements' topic? I can't find it anymore.

@adesh Does the new update changes the way to only show the 'Announcements' topic? I can't find it anymore.
edited Jun 6 '15 at 1:17 am

Great! Thank you so much @adesh !

My final question is if it is possible to upgrade to the noCaptcha reCaptcha for registration? I like the new one so much better than the original one.

@adesh

Hello,

I've upgraded to codoforum v3.3. It's still noCaptcha (the old version) smile . I also found that if you enable the captcha and user inputs a wrong captcha, the user will be not able to re-input the captcha!

@adesh Could you check this?

codo33\codoforum.v.3.3.build-18\codoforum\sys\Controller\user.php

Copy this section code to line 234. It's for error case.

            if (\CODOF\Util::get_opt('captcha') == "enabled") {

                require ABSPATH . 'sys/Ext/recaptcha/recaptchalib.php';
                $publickey = \CODOF\Util::get_opt('captcha_public_key'); // you got this from the signup page
                $this->smarty->assign('recaptcha', recaptcha_get_html($publickey));
            }
>Great! Thank you so much @adesh ! >My final question is if it is possible to upgrade to the noCaptcha reCaptcha for registration? I like the new one so much better than the original one. >@adesh Hello, I've upgraded to codoforum v3.3. It's still noCaptcha (the old version) :( . I also found that if you enable the captcha and user inputs a wrong captcha, **the user will be not able to re-input the captcha**! @adesh Could you check this? ``` codo33\codoforum.v.3.3.build-18\codoforum\sys\Controller\user.php ``` Copy this section code to line 234. It's for error case. ``` if (\CODOF\Util::get_opt('captcha') == "enabled") { require ABSPATH . 'sys/Ext/recaptcha/recaptchalib.php'; $publickey = \CODOF\Util::get_opt('captcha_public_key'); // you got this from the signup page $this->smarty->assign('recaptcha', recaptcha_get_html($publickey)); } ```
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

@nguoianphu I got the new noCaptchaRecaptcha!

Go to:

/codoforum/sites/default/themes/default/templates/user/register.tpl

On around line 140 replace

{$recaptcha}

with:

<div class="g-recaptcha" data-sitekey="PUBLIC-KEY-HERE"></div>

Also, Add in the style tags:

.g-recaptcha {
margin-left: 15px;
}

and add the script:

<script src="https://www.google.com/recaptcha/api.js" async defer></script>
@nguoianphu I got the new noCaptchaRecaptcha! Go to: ```` /codoforum/sites/default/themes/default/templates/user/register.tpl ```` On around line 140 replace ```` {$recaptcha} ```` with: ```` &amp;lt;div class=&quot;g-recaptcha&quot; data-sitekey=&quot;PUBLIC-KEY-HERE&quot;&amp;gt;&amp;lt;/div&amp;gt; ```` Also, Add in the style tags: ```` .g-recaptcha { margin-left: 15px; } ```` and add the script: ```` &amp;lt;script src=&quot;https://www.google.com/recaptcha/api.js&quot; async defer&amp;gt;&amp;lt;/script&amp;gt; ````

Thanks @typad1 ! smile
Did you check the case when a user enters a wrong captcha? Could they re-input it?

Thanks @typad1 ! :) Did you check the case when a user enters a wrong captcha? Could they re-input it?
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).
edited Jun 7 '15 at 5:02 pm

I have not.. however most of the time it doesn't use a captcha.. I will check thiugh.. @nguoianphu

Edit: It works fine! No problems at all!

I have not.. however most of the time it doesn&#039;t use a captcha.. I will check thiugh.. @nguoianphu Edit: It works fine! No problems at all!
edited Jun 7 '15 at 6:20 pm

Hmm, I tried your guide but it doesn't work. Even I click on the right images, it can't verify. smile

Hmm, I tried your guide but it doesn&#039;t work. Even I click on the right images, it can&#039;t verify. :(
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Check out my website http://creepacraftmc.net/forums

Try to register and I will update the tutorial.. maybe even do a video on it..

Check out my website http://creepacraftmc.net/forums Try to register and I will update the tutorial.. maybe even do a video on it..

@typad1 , thank you so much for your kindness!
I still gets error with the new captcha but I will not update it. I will keep the old captcha, it's a lightweight script.

P/S: I can't even choose the right images with the new captcha! Alot of foods cream, flowers....

@typad1 , thank you so much for your kindness! I still gets error with the new captcha but I will not update it. I will keep the old captcha, it&#039;s a lightweight script. P/S: I can&#039;t even choose the right images with the new captcha! Alot of foods cream, flowers....
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Hi,

@typad1 , it is possible.

Open codoforum/sys/CODOF/Forum/Topic.php

In the method get_all_topics(), around line 129,

Replace

. 'WHERE t.topic_status=1 '

with

. 'WHERE t.topic_status=1 AND t.cat_id= 3 '

Here, 3 is a dummy cateogry id . You need to find the category id of the category whose topics you want to show.

You can find the category id by looking at the table codo_categories in the database.

Ummm does this work anymore? @adesh

Also, the reCaptcha doesn't work.. any fixes?

&amp;gt;Hi, &amp;gt;@typad1 , it is possible. &amp;gt;Open codoforum/sys/CODOF/Forum/Topic.php &amp;gt;In the method get_all_topics(), around line 129, &amp;gt;Replace &amp;gt;``` &amp;gt;. &#039;WHERE t.topic_status=1 &#039; &amp;gt;``` &amp;gt;with &amp;gt;``` &amp;gt;. &#039;WHERE t.topic_status=1 AND t.cat_id= 3 &#039; &amp;gt;``` &amp;gt;Here, 3 is a dummy cateogry id . You need to find the category id of the category whose topics you want to show. &amp;gt;You can find the category id by looking at the table codo_categories in the database. Ummm does this work anymore? @adesh Also, the reCaptcha doesn&#039;t work.. any fixes?

@typad1 ,
What is the issue? I created a new account on your site for testing. It works.

@typad1 , What is the issue? I created a new account on your site for testing. It works.
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

@typad1 ,
What is the issue? I created a new account on your site for testing. It works.

What I meant is how would I only show the announcements on the home page.. also, the recaptcha is actually turned off.. so if you don't do it it will still let you register.

&amp;gt;@typad1 , &amp;gt;What is the issue? I created a new account on your site for testing. It works. What I meant is how would I only show the announcements on the home page.. also, the recaptcha is actually turned off.. so if you don&#039;t do it it will still let you register.
12
732
24
4
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft