Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 05:13 am EDT

Geeklog Forums

Inmemoriam Suggestions


Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
I didn't want to polute the main thread where people are asking for help, so thought i'd post some suggestions here.

- In the 'whats new' block, instead of listing each new image it can list 'new albums' instead, this is because I add alot of images and the list could be huge.

- When adding images, the ability to create static images, instead of having to create them later (a small thing)

- ability to run from a different DIR in options, this is just for sites that need for example it in /screenshots/ directory, like mine.

thats about it, looking forward to future updates, when comments and voting is implemented.
GameFaction - For All Your Gaming Needs
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
i'll post a bit of code for you later today Richard, but just wanted to mention that the rating thing works already.
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
Quote by machinari: i'll post a bit of code for you later today Richard, but just wanted to mention that the rating thing works already.


great thanks, on the rating, thats strange, as I've enabled it, and i checked the one that you have linked on your site that has the rating, but mine only has the

Current rating: N/A Voters: 0

but no options to vote
GameFaction - For All Your Gaming Needs
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
it won't let you vote for your own stuff.. maybe that's the issue.
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
doh! slap me Doh! - that was a mistake
GameFaction - For All Your Gaming Needs
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by RichardTowler:
- In the 'whats new' block, instead of listing each new image it can list 'new albums' instead, this is because I add alot of images and the list could be huge.
here is a new plugin_getwhatsnew_inmemoriam() function for you. just delete or comment out the current one and use this in its place. I'll be including both options in the next release, though not necessarily as an option.. Confused
Text Formatted Code

/*
  *
  * API function provides the content of our "What's New" feed.
  * This will return album names and the number of new media items in that album
*/
function plugin_getwhatsnew_inmemoriam(){
    global $INM_TABLES, $_CONF, $LANG_INM01, $INM_CONF;

    $sql = "SELECT aid, COUNT(*) as count FROM {$INM_TABLES['media']} WHERE date >= DATE_SUB(NOW(), INTERVAL {$INM_CONF['whatsnewperioddays']} DAY ) AND status='0'" . COM_getPermSQL('and') . " GROUP BY aid ORDER BY Date DESC LIMIT 15";
    $result = DB_query($sql);
    $nrows = DB_numRows($result);
    if( $nrows == 0 ) {
        $items = $LANG_INM01[35] . '' . LB;
    } else {
        $items = array();
        for( $i = 0; $i < $nrows; $i++ ) {
            list($id, $count) = DB_fetchArray( $result );
            if (inm_hasAlbumAccess($id) >= 2){
                $name = DB_getItem($INM_TABLES['albums'], 'name', $id);
                $str = "<a href=\"{$_CONF['site_url']}/inmemoriam/browse.php?id=$id\">";
                if(!empty($name)){
                    $str .= stripslashes(substr($name,0,$INM_CONF['whatsnewnamelength']));
                } else {
                    $str .= 'album #' . $id;
                }
                $str .= '</a> (' . $count . ')';
                $items[] = $str;
            }
        }
    }
    return $items;
}

 

Quote by RichardTowler:- When adding images, the ability to create static images, instead of having to create them later (a small thing)
This one I won't be accommodating--at least not yet. But when I do, it will end up as an option in the general admin panel--to automatically create static images upon an addition or an approval. The static images admin page will be unaffected.
Quote by RichardTowler:- ability to run from a different DIR in options, this is just for sites that need for example it in /screenshots/ directory, like mine.
I'll be working on this one this weekend.

thanks Rick for the good suggestions.
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
thanks alot, i gave the code a try, but it comes back with

Media last 14 days

Nintendo Revolution (2)
Nintendo Revolution (6)
Nintendo Revolution (2)

the other 2 names should be different...
GameFaction - For All Your Gaming Needs
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
sorry, Richard, I need to turn the music down.

replace the $name = db_getItem line with this complete one:
Text Formatted Code
                    $name = DB_getItem($INM_TABLES['albums'], 'name', "id='$id'");

 
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
thank you, works fine now Big Celebration
GameFaction - For All Your Gaming Needs
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
I hate to nag, but just wondering if you had any luck with the directory thing, as my site is going to 'relaunch' on monday and would be nice to have the directory I will use on that day set, but no problems, just thought it would be worth asking, feel free to shoot me Smile
GameFaction - For All Your Gaming Needs
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
yes yes, that is done--in my working copy. However, this version isn't ready for release yet. It's in pieces so it is not always working and I haven't finished testing various new features.
So I'm not going to let you have it. Leaves me speechless

but! ...You will easily be able to edit the path after install has taken place. Just edit the path in the config file, rename your dir to match and all will be well.

I've only done the public dir as the other ones never make it into the url so they shouldn't be a problem.
Hope that will be acceptable for you.
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
thats fine by me, but call me a noob, in the config file, I cannot find the path to change, maybe its because I woke up too early but I swear I can't find it Doh! - that was a mistake
GameFaction - For All Your Gaming Needs
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
I think you misunderstand me. The relevant path info is only in my copy of the plugin. It won't be in yours until the next version is released. At that time you can edit the path and rename the dir.
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
phew, I'm not stupid than as i couldn't find what wasn't there, well 'that' stupid I should say Doh! - that was a mistake
GameFaction - For All Your Gaming Needs
 Quote

All times are EDT. The time is now 05:13 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content