Go Back   EnjoyCG > General > General Discussion > Comments and suggestions
register now

Welcome to EnjoyCG

EnjoyCG is a community and resource for 3d artists, students and designers. Browse our tutorials, read the latest news or ask a question on the forums.

New around here? register
  #21 (permalink)  
Old 10th March 2007
Jelmer's Avatar
Administrator
Join Date: Oct 2006
Location: The Netherlands
Posts: 2,672
Thanks: 9
Thanked 180 Times in 84 Posts
Send a message via MSN to Jelmer
Quote:
awsome! we are going to want to add some sections though, maybe draw something out before you start editing the code?
yeah, definitely, for now it's just very basic, i'll draw up some ideas and if you have any feel free to post them as well!
Reply With Quote
  #22 (permalink)  
Old 10th March 2007
CU441ES's Avatar
EnjoyCG staff
Join Date: Oct 2006
Location: UK
Posts: 865
Thanks: 2
Thanked 8 Times in 8 Posts
Send a message via MSN to CU441ES
Awesome!! And yea, we would need sections. Maybe have a sidebar with all the categories, user info, latest work etc.
Reply With Quote
  #23 (permalink)  
Old 10th March 2007
Jelmer's Avatar
Administrator
Join Date: Oct 2006
Location: The Netherlands
Posts: 2,672
Thanks: 9
Thanked 180 Times in 84 Posts
Send a message via MSN to Jelmer
I'm trying to add the avatar of the user to their own portfolio page, Madclouds, Wolf, do you guys have any idea how i would go about doing that? Here's some code that's used in other parts of vbulletin to get the poster avatar url:

PHP Code:
$getnews $db->query_read("
                SELECT " 
iif($mod_options['portal_news_showrating'], 'IF(votenum >= ' $vbulletin->options['showvotes'] . ', votenum, 0) AS numbvote, IF(votenum >= ' $vbulletin->options['showvotes'] . ' AND votenum != 0, votetotal / votenum, 0) AS voteavg,') . "
                thread.threadid, post.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=thread.replycount, thread.replycount+1, views) AS views, thread.forumid, post.postid, pagetext, allowsmilie
                " 
iif ($mod_options['portal_news_showsignature'], ', showsignature, sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages, sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight') . "
                " 
iif ($mod_options['portal_news_showicon'] , ',thread.iconid AS threadiconid, iconpath AS threadiconpath') . "
                " 
iif ($mod_options['portal_news_showavatar'] , ', avatarpath, NOT ISNULL(customavatar.filedata) AS hascustom, customavatar.dateline AS avatardateline, avatarrevision') . "
                " 
iif ($mod_options['portal_news_showsubscribed'] AND $vbulletin->userinfo['userid'] , ', NOT ISNULL(subscribethread.subscribethreadid) AS subscribed ') . "
                FROM " 
TABLE_PREFIX "thread AS thread
                LEFT JOIN " 
TABLE_PREFIX "post AS post ON (post.postid = thread.firstpostid)

                LEFT JOIN " 
TABLE_PREFIX "postparsed AS postparsed ON (postparsed.postid = post.postid AND postparsed.styleid = " intval(STYLEID) . " AND postparsed.languageid = " intval(LANGUAGEID) . ")

                " 
iif ($mod_options['portal_news_showicon'] , 'LEFT JOIN ' TABLE_PREFIX 'icon AS icon ON (icon.iconid = thread.iconid)') . "
                " 
iif ($mod_options['portal_news_showavatar'] OR $mod_options['portal_news_showsignature'],
                    
'LEFT JOIN ' TABLE_PREFIX 'user AS user ON (user.userid = post.userid)
                '
) . "
                " 
iif ($mod_options['portal_news_showsignature'], 
                        
'LEFT JOIN ' TABLE_PREFIX 'sigparsed AS sigparsed ON (sigparsed.userid = user.userid AND sigparsed.styleid = ' intval(STYLEID) . ' AND sigparsed.languageid = ' intval(LANGUAGEID) . ')
                        LEFT JOIN ' 
TABLE_PREFIX 'sigpic AS sigpic ON (sigpic.userid = post.userid)') .
                
iif ($mod_options['portal_news_showavatar'] , '
                    LEFT JOIN ' 
TABLE_PREFIX 'avatar as avatar ON (avatar.avatarid = user.avatarid)
                    LEFT JOIN ' 
TABLE_PREFIX 'customavatar as customavatar ON (customavatar.userid = user.userid)
                '
) . "
                " 
iif ($mod_options['portal_news_showsubscribed'] AND $vbulletin->userinfo['userid'] , ' LEFT JOIN ' TABLE_PREFIX 'subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = \'' $vbulletin->userinfo['userid'] . '\')') . "
                WHERE thread.threadid IN(" 
implode(','$newstids) . ")
                " 
iif($ignusers'AND thread.postuserid NOT IN(' $ignusers ')') . "
                $mods[exforums]
                GROUP BY post.postid
                ORDER BY " 
iif($mod_options['portal_news_sticky'], 'sticky DESC,') . iif($mod_options['portal_news_orderby'] == 'postdateline''thread.dateline'$mod_options['portal_news_orderby']) . " $mod_options[portal_news_direction]
                $newslimit
        "
);

// News Avatar
                
if ($mod_options['portal_news_showavatar'])
                {
                    if (
$news['avatarpath'])
                    {
                        
$news['avatarpath'] = $vbulletin->options['bburl'] . '/' $news['avatarpath'];
                    }
                    else if (
$news['hascustom'])
                    {
                        if (
$vbulletin->options['usefileavatar'])
                        {
                            
$news['avatarpath'] = $vbulletin->options['bburl'] . '/' $vbulletin->options['avatarurl'] . '/avatar' $news['postuserid']. '_' $news['avatarrevision'] . '.gif';
                        }
                        else
                        {
                            
$news['avatarpath'] = $vbulletin->options['bburl'] . '/image.php?' $session['sessionurl'] . 'u=' $news['postuserid'] . '&amp;dateline=' $news['avatardateline'];
                        }
                    }
                } 

it should be possible to integrate this with the portfolio mod, if you download the .zip package you'll find the userpage.php file where the code adjustments should be made.
Reply With Quote
  #24 (permalink)  
Old 10th March 2007
Member
Join Date: Dec 2006
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Well, for starters it's probably better to go with that mod and just change out some of the coding. About the Avatar, it's using a conditional IF statement. It's looking for a variable, IF the variable is set to "1" it'll display the avatar. And since the variable isn't being found in the portfolio mod, it won't display the avatar. I must apologize, I've gotta get to work. I can download that mod and take a look probably tomorrow at the earliest. This weekend's pretty packed.
Reply With Quote
  #25 (permalink)  
Old 10th March 2007
Jelmer's Avatar
Administrator
Join Date: Oct 2006
Location: The Netherlands
Posts: 2,672
Thanks: 9
Thanked 180 Times in 84 Posts
Send a message via MSN to Jelmer
Alright, no problem, you're doing this for free so take your time! thanks for the explanation so far, in the mean time i'll work on the layout and graphics which shouldn't require php coding.

update: i managed to fix this myself by using the already defined $ownerid variable, which is the ID of the user who has the portfolio.
Reply With Quote
  #26 (permalink)  
Old 10th March 2007
Jelmer's Avatar
Administrator
Join Date: Oct 2006
Location: The Netherlands
Posts: 2,672
Thanks: 9
Thanked 180 Times in 84 Posts
Send a message via MSN to Jelmer
Another thing i'm trying to achieve with mod_rewrite is allowing users to have a 'subdomain' , so basically i could type jelmer.enjoycg.com and that would show me my portfolio, i'll let you know when it's working.
Reply With Quote
  #27 (permalink)  
Old 11th March 2007
Jelmer's Avatar
Administrator
Join Date: Oct 2006
Location: The Netherlands
Posts: 2,672
Thanks: 9
Thanked 180 Times in 84 Posts
Send a message via MSN to Jelmer
daklol and cu441es, you should be able to create your own temporary portfolio page by going to your user CP, you should find a 'create portfolio' link there.
Reply With Quote
  #28 (permalink)  
Old 12th March 2007
DAKLOL's Avatar
Administrator
Join Date: Oct 2006
Location: USA
Posts: 690
Thanks: 2
Thanked 4 Times in 4 Posts
Send a message via AIM to DAKLOL Send a message via MSN to DAKLOL
alright, ill check it out tonight when i have more time.
Reply With Quote
  #29 (permalink)  
Old 12th March 2007
CU441ES's Avatar
EnjoyCG staff
Join Date: Oct 2006
Location: UK
Posts: 865
Thanks: 2
Thanked 8 Times in 8 Posts
Send a message via MSN to CU441ES
Cool, i'll test it now
Reply With Quote
  #30 (permalink)  
Old 12th March 2007
CU441ES's Avatar
EnjoyCG staff
Join Date: Oct 2006
Location: UK
Posts: 865
Thanks: 2
Thanked 8 Times in 8 Posts
Send a message via MSN to CU441ES
Cool, it worked, the buttons saying gallery about etc. dont work yet .
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads for: Custom portfolio?
Thread Thread Starter Forum Replies Last Post
make your portfolio tutorial! Jelmer Portfolios & websites 5 18th July 2007 02:16 AM
3D Portfolio Star_Wars_Freak Finished work gallery 17 12th June 2007 04:55 AM
Portfolio CU441ES Off topic 7 10th December 2006 04:27 AM

All times are GMT +2. The time now is 03:13 PM.
Copyright © 2006-2008, EnjoyCG