lunarboy.com: graphic design site using EE
Posted: 31 January 2005 06:01 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  37
Joined  12-20-2004

Hi all:

I just wanted to announce that I recently launched my new graphic design portfolio site: lunarboy.com

It’s using EE as the CMS. For cross-linking purposes, each project belongs to at least three categories: type, client and agency. That way, with a little custom PHP, for pages such as the resume and client list, I can list the projects (using thumbnails) according to agency or client.

Thanks for all the forum help!


—-Roger

Profile
 
 
Posted: 01 February 2005 05:59 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  831
Joined  04-17-2002

wow! Impressive CV, Roger. Great list of clients and very cool site. I especially like the glo menus. I would be very interested in how you achieved the crosslinking if you would care to share.

 Signature 

antipodean.org | uptheduff.org

Profile
 
 
Posted: 01 February 2005 09:30 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  37
Joined  12-20-2004

I don’t mind sharing at all.

I don’t consider myself an expert at PHP or MySQL, but I can kind of hack my way around it. So please forgive me if this isn’t the cleanest code.

Let’s take a look at the Resume. Basically needed to nest a list of entries (projects done at a job) that was related to each item of a category (jobs). Additionally, having just the titles of the entries was not enough, I also needed fields from those entries. So I had to use some PHP/MySQL code to help me through that:

<div class=&quot;ressect&quot;><!-- BEGIN EXPERIENCE SECTION -->
    <
img src=&quot;http://{site_base}images/hrd-experience.gif&quot; />
    
<br />
    
    <!--
Display entries from the 'resume' weblog that belong to the 'Experience' category -->
    
{exp:weblog:entries weblog=&quot;resume&quot; rdf=&quot;off&quot; category=&quot;35&quot;}
    
<div class=&quot;job&quot;>
        <
p><strong>{title}</strong></p>
        <
p>{resExpCompany}</p>
        <
p>{resExpStartDate}&amp;nbsp;-&amp;nbsp;{resExpEndDate}</p>
        
{resExpDescription}
        
<div class=&quot;jobThumbnails&quot;>
<?php
    
// Get entry_id and url_title of entries in category
    
$lbsql=&quot;SELECT DISTINCT exp_weblog_titles.entry_id, exp_weblog_titles.url_title
            FROM exp_weblog_titles
            LEFT JOIN exp_weblog_data ON exp_weblog_titles
.entry_id = exp_category_posts.entry_id
            LEFT JOIN exp_category_posts ON exp_weblog_titles
.entry_id = exp_category_posts.entry_id
            LEFT JOIN exp_categories ON exp_category_posts
.cat_id = exp_categories.cat_id
            WHERE exp_category_posts
.cat_id = {resExpAgencyCat}
            ORDER BY exp_weblog_titles
.entry_date DESC&quot;;
    
$lbresult = mysql_query($lbsql);
    
$lbnum_rows = mysql_num_rows($lbresult);
    
$lbcount = 0;
    
    
// Dump results into Array
    
while ($lbrow = mysql_fetch_array($lbresult, MYSQL_ASSOC)) {
        $lbArr[]
= $lbrow;
        
}
    mysql_free_result
($lbresult);
    
    
// Get Project Type (field_id_40) and print URL for each project
    
while ($lbcount < $lbnum_rows) {
        $lbentry
= $lbArr[$lbcount][&quot;entry_id&quot;];
        
$lburl = $lbArr[$lbcount][&quot;url_title&quot;];
        
$lbsql = &quot;SELECT field_id_40
                FROM exp_weblog_data
                WHERE entry_id
= $lbentry&quot;;
        
$lbresult = mysql_query($lbsql);
        
$lbrow = mysql_fetch_array($lbresult, MYSQL_NUM);
?>

    
<a href=&quot;http://{site_ee}/<?php echo &quot;$lbrow[0]/project/$lburl&quot;; ?>&quot;
        
onmouseout=&quot;MM_swapImgRestore()&quot; onmouseover=&quot;MM_swapImage('
        <?php echo &quot;i$lbentry&quot;; ?>'
,'','http://{site_base}project/
        <?php echo &quot;$lbentry&quot;; ?>/listimage-over.jpg'
,1)&quot;>
    <
img src=&quot;http://{site_base}project/
        
<?php echo &quot;$lbentry&quot;; ?>/listimage.jpg&quot; width=&quot;78&quot;
        
height=&quot;59&quot; border=&quot;0&quot; id=&quot;
        
<?php echo &quot;i$lbentry&quot;; ?>&quot;
        
name=&quot;<?php echo &quot;i$lbentry&quot;; ?>&quot; />
    </
a>

<?php
        
// echo &quot;$lbentry/$lbrow[0]/$lburl<br>&quot;;
        
$lbcount++;
        
}

mysql_free_result
($lbresult);

    
// Reset Array
    
unset($lbArr);
?>

        
</div>
    </
div>
    
{/exp:weblog:entries}
</div><!--END EXPERIENCE-->


1. EE starts to list each entry in the ‘Jobs’ category.
2. For each entry, PHP retreives and spits out the thumbnail and link for each associated project.
3. EE continues the loop until there are no more entries in the ‘Jobs’ category.

I hope that was clear…

Profile
 
 
Posted: 01 February 2005 11:37 PM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  831
Joined  04-17-2002

This could be very useful for me. Thank you.

 Signature 

antipodean.org | uptheduff.org

Profile
 
 
Posted: 04 February 2005 05:48 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  63
Joined  06-07-2004

This is really extraordinary.  Great to have someone with Roger’s credentials in the EE family.

Profile
 
 
Posted: 18 November 2005 01:13 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  326
Joined  09-30-2003

A couple of days ago i went to lunarboy.com to see and learn from his gallery project. but the site was having major php errors. Today still trouble. Has been for over two days. perhaps someone can give him a hand ( i am asking on his behalf cause such a great EE site should be up asap). thx

Profile
 
 
Posted: 18 November 2005 02:07 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  147
Joined  10-21-2005

Looks like his host upgraded their version of PHP.  He’ll need to upgrade his EE to the latest build.

 Signature 

1.6.4 | 20080829 | business | pleasure

Profile
 
 
Posted: 18 November 2005 02:50 PM   [ Ignore ]   [ # 7 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6086
Joined  08-04-2002

I fired off an email.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66397 Total Logged-in Users: 31
Total Topics: 84732 Total Anonymous Users: 15
Total Replies: 454741 Total Guests: 222
Total Posts: 539473    
Members ( View Memberlist )
Newest Members:  Liju.Btom2000kalkalmohanraoelcisyncronosDan Kingsburypaulgoodeanugrah1986gregandkari