Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 08:11 pm EDT

Geeklog Forums

upage v 2.0 released!

Page navigation


Status: offline

amckay

Forum User
Full Member
Registered: 03/23/02
Posts: 180
Excellent news! I'll try to get a dot-release out in the next few days incorporating these changes
 Quote

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
Alan.. suggestion for your dot release... More checking on the type of file being uploaded. ie. remove spaces, invalid chars such as (, @, spaces, etc...

A couple of my (l)users have had troubles uploading files. I have the user rename the files to something more generic and it works.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

Status: offline

amckay

Forum User
Full Member
Registered: 03/23/02
Posts: 180
Hmmm, not sure if there is anything I can do since that is on the client/browser side. Will see ...
 Quote

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
Alan,

I added a bit to your upage plugin to suit my site. When a userA views another users profile (users.php?mode=profile&uid=#) it will display the first 5 of the users user pictures. I accomplished this with the following enhancements.

in /path/to/geeklog/upage/functions.inc add the following to the bottom:
Text Formatted Code

function plugin_profilevariablesdisplay_upage ($uid, &$template)
{

    global $_TABLES, $_CONF, $_USER, $LANG_UPAGE;

    $query = DB_query ("SELECT upic_uid, upic_file, upic_caption FROM {$_TABLES['upic']} WHERE upic_uid = {$uid} ORDER BY upic_id");
    $numrows = DB_numRows($query);
    if ($numrows > 0) {
    for( $i = 1; $i <= $numrows; $i++) {
        $A = DB_fetchArray ($query);
        $template->set_var('upage_file' . $i .'', '<a href="/upage/onepic.php?file='
                                        . $A['upic_file'] . '&uid=' . $A['upic_uid']
                                        .'&scale=screen"><img src="/upage/upic/' . $A['upic_uid']
                                        . '/___small.' . $A['upic_file'] . '" alt="" border="0" width="75" height="60" title="'
                                        . $A['upic_caption'] . '" /></a>');
        $template->set_var('lang_userphotos', $LANG_UPAGE['my_photos']);
        }
    } else {
        $template->set_var('lang_userphotos', $LANG_UPAGE['my_photos']);
        $template->set_var('upage_file1', 'None');
    }
}

 


in /path/to/geeklog/public_html/layout/YOURLAYOUT/users/profile.thtml add the following where ever you want. I added mine between userphoto and member since.
Text Formatted Code

<tr valign="top">
    <td class="globalCellTitle" width="110" align="left" nowrap><b>{lang_userphotos}:</b></td>
    <td class="globalCellText">{upage_file1}{upage_file2}{upage_file3}{upage_file4}{upage_file5}</td>
</tr>



 

feel free to add it to the upage plugin if you like. a decent working example can be seen here.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

Status: offline

amckay

Forum User
Full Member
Registered: 03/23/02
Posts: 180
NOte that official support for upage is here :

https://secure.quay.net/community/viewforum.php?f=6

I don't make it to these forums often but am reachable above usually within a few hours.
 Quote

Page navigation

All times are EDT. The time is now 08:11 pm.

  • 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