Sinisterly
[MyBB] Any tutorials you'd like to see? - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Design (https://sinister.ly/Forum-Design)
+--- Forum: Web Design (https://sinister.ly/Forum-Web-Design)
+--- Thread: [MyBB] Any tutorials you'd like to see? (/Thread-MyBB-Any-tutorials-you-d-like-to-see)

Pages: 1 2 3 4 5 6 7 8 9


RE: Any tutorials you'd like to see? - Krados - 11-30-2015

(11-30-2015, 10:09 PM)Furry Wrote:
(11-30-2015, 10:04 PM)Forgotten Wrote: A tutorial on how to fully use the Inspect Element would be appreciated, thanks!

Are you serious?

Ah, nevermind. :/


RE: Any tutorials you'd like to see? - Jasper - 11-30-2015

(11-30-2015, 10:20 PM)Forgotten Wrote:
(11-30-2015, 10:09 PM)Furry Wrote:
(11-30-2015, 10:04 PM)Forgotten Wrote: A tutorial on how to fully use the Inspect Element would be appreciated, thanks!

Are you serious?

Ah, nevermind. :/

This is for only MyBB tutorials, incase you didn't know that. Sorry if the title made you confused.


RE: Any tutorials you'd like to see? - Krados - 11-30-2015

(11-30-2015, 10:22 PM)Furry Wrote:
(11-30-2015, 10:20 PM)Forgotten Wrote:
(11-30-2015, 10:09 PM)Furry Wrote:
(11-30-2015, 10:04 PM)Forgotten Wrote: A tutorial on how to fully use the Inspect Element would be appreciated, thanks!

Are you serious?

Ah, nevermind. :/

This is for only MyBB tutorials, incase you didn't know that. Sorry if the title made you confused.

Aha it's alright, thanks anyways. ^^


RE: [MyBB] Any tutorials you'd like to see? - Para - 11-30-2015

Quick question as I've never done any MyBB plugins/coding before. How do you filter posts made in a forum that does not increase the post count? Do you just make an array of subforums that you don't count records from in the SQL query?

If the above doesn't make sense. In your top poster plugin how do you stop it counting records from posts made in a specific section(such as spam).


RE: [MyBB] Any tutorials you'd like to see? - Jasper - 11-30-2015

(11-30-2015, 10:34 PM)Paradigm Wrote: Quick question as I've never done any MyBB plugins/coding before. How do you filter posts made in a forum that does not increase the post count? Do you just make an array of subforums that you don't count records from in the SQL query?

If the above doesn't make sense. In your top poster plugin how do you stop it counting records from posts made in a specific section(such as spam).

There is forum permissions to choose from.

[Image: LxJ3BUR.png]


RE: [MyBB] Any tutorials you'd like to see? - Para - 11-30-2015

(11-30-2015, 10:42 PM)Furry Wrote:
(11-30-2015, 10:34 PM)Paradigm Wrote: Quick question as I've never done any MyBB plugins/coding before. How do you filter posts made in a forum that does not increase the post count? Do you just make an array of subforums that you don't count records from in the SQL query?

If the above doesn't make sense. In your top poster plugin how do you stop it counting records from posts made in a specific section(such as spam).

There is forum permissions to choose from.

[Image: LxJ3BUR.png]

Sorry I don't think I explained myself clearly. I know there is a option within MyBB to disable postcount being added if posted in a certain subforum. My question is when writing a plugin to check the amount of posts made today how would you do so excluding those forums.

For Example if I was to code a plugin to check how many posts a user has posted today however I wanted to exclude the forums that do not add to the post count. Would I just need to create an array of ID's for the subforums and don't count records from the array?


RE: [MyBB] Any tutorials you'd like to see? - Jasper - 11-30-2015

(11-30-2015, 10:50 PM)Paradigm Wrote:
(11-30-2015, 10:42 PM)Furry Wrote:
(11-30-2015, 10:34 PM)Paradigm Wrote: Quick question as I've never done any MyBB plugins/coding before. How do you filter posts made in a forum that does not increase the post count? Do you just make an array of subforums that you don't count records from in the SQL query?

If the above doesn't make sense. In your top poster plugin how do you stop it counting records from posts made in a specific section(such as spam).

There is forum permissions to choose from.

[Image: LxJ3BUR.png]

Sorry I don't think I explained myself clearly. I know there is a option within MyBB to disable postcount being added if posted in a certain subforum. My question is when writing a plugin to check the amount of posts made today how would you do so excluding those forums.

For Example if I was to code a plugin to check how many posts a user has posted today however I wanted to exclude the forums that do not add to the post count. Would I just need to create an array of ID's for the subforums and don't count records from the array?

Something along these line would work:

Code:
// FIDs to Ignore. $fids = array('1','2'); foreach ($fids as &$fid) { $fidstoignore = " AND t.fid NOT IN(" . $fid . ") "; }

And then a query which selects ( in my case, ".table_prefix."threads t (thus t.fid) ).

Code:
$query = $db->query(" SELECT * FROM ".TABLE_PREFIX."threads t WHERE 1=1 t.visible > {$fidstoignore} ");

And then fetch it:

Code:
while($whatever = $db->fetch_array($query)) { // whatever }

Full code

Code:
// FIDs to Ignore. $fids = array('1','2'); foreach ($fids as &$fid) { $fidstoignore = " AND t.fid NOT IN(" . $fid . ") "; $query = $db->query(" SELECT * FROM ".TABLE_PREFIX."threads t WHERE 1=1 t.visible > {$fidstoignore} "); while($whatever = $db->fetch_array($query)) { // whatever } }

I hope you get the idea.


RE: [MyBB] Any tutorials you'd like to see? - Para - 11-30-2015

(11-30-2015, 11:18 PM)Furry Wrote:
(11-30-2015, 10:50 PM)Paradigm Wrote:
(11-30-2015, 10:42 PM)Furry Wrote:
(11-30-2015, 10:34 PM)Paradigm Wrote: Quick question as I've never done any MyBB plugins/coding before. How do you filter posts made in a forum that does not increase the post count? Do you just make an array of subforums that you don't count records from in the SQL query?

If the above doesn't make sense. In your top poster plugin how do you stop it counting records from posts made in a specific section(such as spam).

There is forum permissions to choose from.

[Image: LxJ3BUR.png]

Sorry I don't think I explained myself clearly. I know there is a option within MyBB to disable postcount being added if posted in a certain subforum. My question is when writing a plugin to check the amount of posts made today how would you do so excluding those forums.

For Example if I was to code a plugin to check how many posts a user has posted today however I wanted to exclude the forums that do not add to the post count. Would I just need to create an array of ID's for the subforums and don't count records from the array?

Something along these line would work:

Code:
// FIDs to Ignore. $fids = array('1','2'); foreach ($fids as &$fid) { $fidstoignore = " AND t.fid NOT IN(" . $fid . ") "; }

And then a query which selects ( in my case, ".table_prefix."threads t (thus t.fid) ).

Code:
$query = $db->query(" SELECT * FROM ".TABLE_PREFIX."threads t WHERE 1=1 t.visible > {$fidstoignore} ");

And then fetch it:

Code:
while($whatever = $db->fetch_array($query)) { // whatever }

Full code

Code:
// FIDs to Ignore. $fids = array('1','2'); foreach ($fids as &$fid) { $fidstoignore = " AND t.fid NOT IN(" . $fid . ") "; $query = $db->query(" SELECT * FROM ".TABLE_PREFIX."threads t WHERE 1=1 t.visible > {$fidstoignore} "); while($whatever = $db->fetch_array($query)) { // whatever } }

I hope you get the idea.

That's what I was looking for. I'm going to be learning to code some plugins so will use some of your examples previously as a base to learn from.


RE: [MyBB] Any tutorials you'd like to see? - AFK - 12-09-2015

Disable the email field on registration. (Not sure if this is an option or not?)


RE: [MyBB] Any tutorials you'd like to see? - Jasper - 12-09-2015

(12-09-2015, 12:46 AM)AFK Wrote: Disable the email field on registration. (Not sure if this is an option or not?)

As far as I can see, there's no option to remove the email field (you could do it via templates but it would just throw a error). Best thing to remove it would be a core edit.