Functionality requests for SSI in the next version of SMF

Started by Grudge, December 25, 2006, 04:01:55 AM

Previous topic - Next topic

RileyHarper

I think it would be cool if all the boards had header and footer areas that you could edit while you're creating or modifying the boards. It would be a nice way to easily customize the boards without a lot of hassle. Thank you.  :)

-Rye

IchBin™

RileyHarper, this isn't a suggestion topic for features. This is a suggestion topic for more functionality in SSI.
IchBin™        TinyPortal

Enc0der

Is this thread still active & relevant?





I want to make a small change to the ssi_topTopics() function on SSI.php for SMF 2.0 beta 4.
I want to show the top topics by reply, but limit the results to topics that have started within the last X days only.

This will allow me to have a "hot topics" section on my homepage, that is always current and updated - without letting large topics from 3 years ago "stuck" in there forever...



I actually already did this change for the SSI.php of my current SMF 1.1.6, but I believe that now it's a bit different.. right?

Here is the new query that I did for SMF 1.x
The changed lines are bold:

    if ($modSettings['totalMessages'] > 100000)
    {
        $q = "SELECT topics.ID_TOPIC, ID_FIRST_MSG
            FROM topics
           INNER JOIN messages
            ON (topics.ID_FIRST_MSG=messages.ID_MSG)
            WHERE numReplies !=0
            AND posterTime >= " . (time() - $days * 86400) . "
            AND topics.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")
            ORDER BY numReplies DESC
            LIMIT 100";
        $request = db_query($q, __FILE__, __LINE__);
        $topic_ids = array();
        while ($row = mysql_fetch_assoc($request))
            $topic_ids[] = $row['ID_TOPIC'];
        mysql_free_result($request);
    }


I also added an index for the posterTime column on the 'messages' tables, to increase performance (by a HUGH difference), along with saving this to a static text file and update it hourly by a cronjob.
(I forgot to mention that I have a very large forum, over 3 million messages)

What is the easiest and most effective way to achieve this in SMF 2.0?


I also noticed that the SSI of SMF 2.0 doesn't have the $exclude_boards variables.
This is a shame, because I really likes to possibility to exclude off-topics boards from this function (even though the users have access to them).

Can I just add this line (and of course set the $exclude_boards array), and it will work?


Here is the original function of the SMF 2.0 version:
--------------------------------------------------

        $request = $smcFunc['db_query']('', '
            SELECT id_topic
            FROM {db_prefix}topics
            WHERE num_' . ($type != 'replies' ? 'views' : 'replies') . ' != 0' . ($modSettings['postmod_active'] ? '
                AND approved = {int:is_approved}' : '') . '
            ORDER BY num_' . ($type != 'replies' ? 'views' : 'replies') . ' DESC
            LIMIT 100',
            array(
                'is_approved' => 1,
            )
        );


Please guide me on how to make it exclude boards, and limit the results to X days.


Thank you![/hr]

[SiNaN]

I believe adding the 'posterTime' statement there as you did in 1.1.6 and using 'exclude_boards' is a good way to do this.
Former SMF Core Developer | My Mods | SimplePortal

rockgeek

Ability to list the posts of a specific thread outside on ther forums i.e. in a drupal node


rockgeek

#106
Fatal error: Cannot redeclare db_query() (previously declared in /home/user/public_html/includes/database.mysql-common.inc:33) in /home/user/public_html/forums/Sources/Subs.php on line 98

Enc0der

You have a conflict with another script on your website.. no quick solution for this as far as I know.

darrenbeige

Seeing as V2.0 allows for custom profile fields, I think you should be able to retrieve those custom field values through SSI....

Thanks,

PS: And grabPost functionality like this: grapPost(topic=111.00) with array and echo modes

mule

I had a request/suggestion on how to make the calendar easier to use.    Once I enter information on the calendar, I am only
allowed to revise information that was originally typed in the text box.  I can't get in to change the date, the year, the title, the number of days to list the event, etc.  Since all the activities I have listed on the calendar are repeated the following year, that means I have to re-enter every single entry every year.  This is very time-consuming. Could you set it up so that any of the data can easily be revised in one screen?

IchBin™

This is a suggestion topic for SSI requests. It doesn't have anything to do with the calendar. There's a suggestions board for any SMF suggestions you'd like to add.
IchBin™        TinyPortal

dazappa

ssi_recentPolls. Why's the current one limited to just one? ><

[SiNaN]

It is most probably because just few people would want to display more than one poll on the same page.
Former SMF Core Developer | My Mods | SimplePortal

TheDisturbedOne

How about the ability to archive posts in a different database.  I know there's a software that does this.

significantpickle

How about a Woopra plug in for real time site analytics? It's at hxxp:www.woopra.com [nonactive]

LaxnLatino

Is there a way to have more than one visible image for the member group(s) your in. Like i was in a clan for a while and you could be in multiple groups and have different images for each. I set that up on the forum i just created through you guys and it only shows my admin button

Arantor

Quote from: LaxnLatino on December 22, 2009, 02:24:11 PM
Is there a way to have more than one visible image for the member group(s) your in. Like i was in a clan for a while and you could be in multiple groups and have different images for each. I set that up on the forum i just created through you guys and it only shows my admin button

That's nothing concerning SSI. Please ask in the support board for your version of SMF.

maharjanumesh

Well i don't know whether this one is discussed or solved or not

i have website, and i installed the forum in the sub-domain

i put the login code in the website

Quote<?php

require ('forum/SSI.php');
ssi_login();

?>

but whenever members try to login, the page is directed to forum

is there anyway to use the Login function in such a way that, after login/logout, the page is not directed to forum and stay at website

Arantor

What page do you want them to go back to, exactly? Put that URL in as a parameter to ssi_login like so:

<?php require('forum/SSI.php'); ?>
... other code goes here ...
<?php ssi_login('http://example.com'); ?>


Note that the call to require should be the very, very first thing in the page, even before any other HTML, to ensure it deals with cookies and sessions appropriately.

maharjanumesh

^^

thank you very much it really helped me

is there any function to have the register account form, like login form


if yes please help me out

Advertisement: