<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Umbrella Development &#187; iLance</title>
	<atom:link href="http://www.umbrella-development.com/category/blog/ilance-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.umbrella-development.com</link>
	<description></description>
	<lastBuildDate>Sat, 03 Apr 2010 02:06:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Featured Auctions Displayed</title>
		<link>http://www.umbrella-development.com/2010/03/featured-auctions-displayed/</link>
		<comments>http://www.umbrella-development.com/2010/03/featured-auctions-displayed/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 23:09:00 +0000</pubDate>
		<dc:creator>Umbrella</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[iLance]]></category>
		<category><![CDATA[ilance]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.umbrella-development.com/?p=243</guid>
		<description><![CDATA[It&#8217;s a common question. How do we make the front page show more than just 3 featured product or service Auctions? And it&#8217;s not as hard as you think!
Open your main.php file in your favorite editor and then find the following code
&#60;br /&#62;
        // #### FEATURE AUCTIONS ###############################################&#60;br [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a common question. How do we make the front page show more than just 3 featured product or service Auctions? And it&#8217;s not as hard as you think!</p>
<p>Open your main.php file in your favorite editor and then find the following code<span id="more-243"></span></p>
<pre class="brush: php; first-line: 1466; highlight: [1471,1475];">&lt;br /&gt;
        // #### FEATURE AUCTIONS ###############################################&lt;br /&gt;
        $show['featuredserviceauctions'] = $show['featuredproductauctions'] = false;&lt;br /&gt;
        $featuredserviceauctions = $featuredproductauctions = array();&lt;/p&gt;
&lt;p&gt;        if ($ilconfig['globalauctionsettings_serviceauctionsenabled'])&lt;br /&gt;
        {&lt;br /&gt;
                $featuredserviceauctions = $ilance-&amp;gt;auction-&amp;gt;fetch_featured_auctions('service', 3, 1, 0, '', true);&lt;br /&gt;
        }&lt;br /&gt;
        if ($ilconfig['globalauctionsettings_productauctionsenabled'])&lt;br /&gt;
        {&lt;br /&gt;
                $featuredproductauctions = $ilance-&amp;gt;auction-&amp;gt;fetch_featured_auctions('product', 3, 2, 0, '', true);&lt;br /&gt;
        }&lt;br /&gt;
</pre>
<p>You will note line 1471 and 1475 are highlighted in the code above. These are the two lines we need to edit to change the number of auctions we are displaying. You will note that in each line there is a 3. This is the number of featured auctions that will be returned. Just change that number to equal how many you want to have appear on your main page.</p>
<p> Thats it.</p>
<p>See I told you it was easy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.umbrella-development.com/2010/03/featured-auctions-displayed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Trouble shooting Plugins</title>
		<link>http://www.umbrella-development.com/2010/03/trouble-shooting-plugins/</link>
		<comments>http://www.umbrella-development.com/2010/03/trouble-shooting-plugins/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 02:03:51 +0000</pubDate>
		<dc:creator>Umbrella</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[iLance]]></category>
		<category><![CDATA[Addon]]></category>
		<category><![CDATA[ilance]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.umbrella-development.com/?p=206</guid>
		<description><![CDATA[Sometimes plugins go Rogue and need to be debugged. But if you don't know how to properly name your backup copy of the plugin file, you could find yourself going from bad to worse in a matter of seconds.]]></description>
			<content:encoded><![CDATA[<p>Plugins, we want em, we need em, we love em.<br />
<br/></p>
<p>But sometimes they have bugs. Unfortunately as with all software, even plugins will have their bugs. We try our hardest to test them, but inevitibilly we cannot account for every environment that they will be assimilated into. Sometimes plugins can push eachother around, other times it can be another customization that causes a Plugin to go rogue. While everyone loves a self starter I&#8217;ve found that sometimes self-starters shoot themselves in the foot due to a lack of understanding what it is they&#8217;re doing. So, I&#8217;m hoping this article will help some of you self starters avoid what I&#8217;ve found to be a common pitfall in debugging plugins when they act funny after you install them.<br />
<br/></p>
<p>Most ilance marketplace owners at least attempt to do some of their own debugging prior to waiting for a support response. I think everyone familiar with any modicum of programming knows to make backups of the files they plan on altering. If you don&#8217;t then shame on you. If you do, then there is something you need to know about your <em>plugin_xxxxx.xml</em> files.<br />
<br/></p>
<p>Making a backup is very important. So in backing up your plugin you will most likely make a copy of it. Good idea! However, what most marketplace owners fail to realize is how iLance loads those plugins. When making your backup copy make sure you rename your copy so that the first word in the title is not <strong><em>&#8220;plugin_&#8221;</em></strong>. This is exactly what iLance looks for when it&#8217;s loading your plugin files. Anything inside your /functions/xml/ Directory that starts with the string value of <strong><em>&#8220;plugin&#8221;</em></strong> will be loaded. What happens if you do? iLance will load that plugin twice, because it things that <strong><em>plugin_myplug.xml</em></strong> and <strong><em>plugin_myplug_old.xml</em></strong> are two separate plugins that need to be loaded. Which in turn will make it look like you have the plugin installed twice on your marketplace by duplicating everything the plugin does.<br />
<br/></p>
<p>I&#8217;ve personally been contacted numerous times by the self-starting marketplace owners who are taking their code into their own hands (kudos to you guys/gals!). Unfortunately for them they had and left the plugin_ at the beginning of the file name when making their backup copy. So remember to put some word or text in front of the term plugin in your file name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.umbrella-development.com/2010/03/trouble-shooting-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Member Profiles &#8211; Default Tabs?</title>
		<link>http://www.umbrella-development.com/2009/12/member-profiles-default-tabs/</link>
		<comments>http://www.umbrella-development.com/2009/12/member-profiles-default-tabs/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 02:40:33 +0000</pubDate>
		<dc:creator>Umbrella</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[iLance]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ilance]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.grimeygames.com/umdev/?p=127</guid>
		<description><![CDATA[It was recently asked in the iLance forums how to set which tab is the default that appears on a members profile when someone clicks the link. Our goal here is to make the Full Profile tab be our default visible tab whenever someone clicks a username link to go to their profile. There are several ways to [...]]]></description>
			<content:encoded><![CDATA[<p>It was recently asked in the<a href="http://www.ilance.com/forum/showthread.php?p=33976&amp;posted=1#post33976" target="_blank"> iLance forums</a> how to set which tab is the default that appears on a members profile when someone clicks the link. Our goal here is to make the Full Profile tab be our default visible tab whenever someone clicks a username link to go to their profile. There are several ways to accomplish this, so lets review them.</p>
<p>First we need to know how iLance prints the username and it&#8217;s associated link. One might think it&#8217;s straight forward, and that editing the html template will do the trick. Sorry, that&#8217;s not the case. With a little digging you will find that iLance prints the users name and profile link with a function called <strong>print_username</strong>. You&#8217;ll find this function in the <strong>functions/core/</strong> directory buried in the <strong>functions.php</strong> file.</p>
<p>The function accepts a number of parameters which you can see in the code below:</p>
<pre class="brush: php;"> 

function print_username($userid, $mode = 'href', $bold = 0, $extra = '', $extraseo = '', $displayname = '')
{
</pre>
</pre>
<ol>
<li>The userid...simple enough.</li>
<li>The Mode, upon reviewing the code you will find that there are several modes for this function to handle. those being:<br />
<strong>href, plain, custom, and url</strong>.</li>
<li>bold. A simple 1 or 0 will tell the function whether or not to make the link bold.</li>
<li>extra: allows us to pass custom parameters to the url that will be placed inside the link</li>
<li>extraseo: allows us to pass custom parameters to the url and will display the url and not return a link.</li>
<li>The final one doesn't even warrant an explaination. <img src='http://www.umbrella-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>Now that we know our function lets look at a couple different ways to acheive our goal. The first and simplest approach is to hack the function to make it do what we want. Simple enough. I personally am not using SEO currently so in this example I will only show how to alter the regular links.</p>
<p>First we need to find everywhere in the code where we are building the link I've highlighted the relevant lines below so you can see what I'm talking about.</p>
<pre class="brush: php; first-line: 3946; highlight: [3969,3996,4008];">

function print_username($userid, $mode = 'href', $bold = 0, $extra = '', $extraseo = '', $displayname = '')
{
        global $ilance, $myapi, $ilpage, $ilconfig;
       
        $username = fetch_user('username', intval($userid));
        $html = '';
       
        // modes: href and plain
        if (isset($mode) AND $mode == 'href')
        {
                $displayname = $username;
                // bold usernames?
                if (!empty($bold) AND $bold)
                {
                        $displayname = '&lt;strong&gt;'.$username.'&lt;/strong&gt;';
                }
                // does admin use SEO urls?
                if ($ilconfig['globalauctionsettings_seourls'])
                {
                        $html .= '&lt;a href=&quot;' . ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . print_seo_url($ilconfig['memberslistingidentifier']) . '/' . construct_seo_url_name($username) . $extraseo . '&quot; rel=&quot;nofollow&quot;&gt;' . $displayname . '&lt;/a&gt; ' . construct_username_bits(intval($userid));
                }
                else
                {
                        $html .= '&lt;a href=&quot;' . ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . $ilpage['members'] . '?id=' . intval($userid) . $extra . '&amp;profile=1&quot; rel=&quot;nofollow&quot;&gt;' . $displayname . '&lt;/a&gt; ' . construct_username_bits(intval($userid));
                }   
        }
        else if (isset($mode) AND $mode == 'plain')
        {
                $displayname = $username;
                // bold usernames?
                if (!empty($bold) AND $bold)
                {
                        $username = '&lt;strong&gt;'.$displayname.'&lt;/strong&gt;';
                }
                $html = $username;
        }
        else if (isset($mode) AND $mode == 'custom')
        {
                // bold usernames?
                if (!empty($bold) AND $bold)
                {
                        $displayname = '&lt;strong&gt;'.$displayname.'&lt;/strong&gt;';
                }
                // does admin use SEO urls?
                if ($ilconfig['globalauctionsettings_seourls'])
                {
                        $html .= '&lt;a href=&quot;' . ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . print_seo_url($ilconfig['memberslistingidentifier']) . '/' . construct_seo_url_name($username) . $extraseo . '&quot; rel=&quot;nofollow&quot;&gt;' . $displayname . '&lt;/a&gt;';
                }
                else
                {
                        $html .= '&lt;a href=&quot;' . ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . $ilpage['members'] . '?id=' . intval($userid) . $extra . '&quot; rel=&quot;nofollow&quot;&gt;' . $displayname . '&lt;/a&gt;';
                }
        }
        else if (isset($mode) AND $mode == 'url')
        {
                // does admin use SEO urls?
                if ($ilconfig['globalauctionsettings_seourls'])
                {
                        $html .= ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . print_seo_url($ilconfig['memberslistingidentifier']) . '/' . construct_seo_url_name($username) . $extraseo;
                }
                else
                {
                        $html .= ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . $ilpage['members'] . '?id=' . intval($userid) . $extra;
                }
        }
       
        return $html;
}
</pre>
<p> </p>
<p>Now we need to alter the code. Lets take our first highlighted line as an example:</p>
<pre class="brush: php;">

$html .= '&lt;a href=&quot;' . ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . $ilpage['members'] . '?id=' . intval($userid) . $extra . '&quot; rel=&quot;nofollow&quot;&gt;' . $displayname . '&lt;/a&gt; ' . construct_username_bits(intval($userid));
</pre>
<p>make it look like this:</p>
<pre class="brush: php;">

$html .= '&lt;a href=&quot;' . ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . $ilpage['members'] . '?id=' . intval($userid) . $extra . '&amp;profile=1&quot; rel=&quot;nofollow&quot;&gt;' . $displayname . '&lt;/a&gt; ' . construct_username_bits(intval($userid));
</pre>
<p>If you look closely you will notice right after the <strong>$extra.'</strong> we added <strong>&amp;profile=1"</strong> so now it looks like this <strong>$extra . '&amp;profile=1"</strong></p>
<p>Now just do this for all three highlighted areas in the code and you're done! Right? Well, yes and no. You are if you don't mind a hackjob. The more elegant way to do this and the way it was meant to be used, albeit the more time consuming method is to use the function as it is supposed to be used. By setting the parameters the way you want them set when you call the function.</p>
<p>What did he just say?!!</p>
<p>Simple, throughout the iLance script the <strong>print_username</strong> function is called. Do a find all with your favorite editor and then recode the calls to the functions so they provide the desired results. Of course this is also the more code intense way as well and you will need to be familiar with php and html.</p>
<p>For example, the forum ask's how this can be achieved from auction area. So for example we will use a product or forward auction as an example. Navigate to a product auction on your marketplace. You will note that the page in the url that you are looking at is <strong>merch.php</strong>, open that file, follow the code to the correct template. In our case the template is <strong>listing_forward_auction.html</strong> now open that up. Follow the template html to where the link is appearing. You will find it is actually being parsed into the template as a variable called <strong>{seller}</strong></p>
<pre class="brush: xml;">

{apihook[seller_infobit_table_start]}
        
        &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;9&quot; cellspacing=&quot;1&quot;&gt;
        &lt;tr&gt;
            &lt;td width=&quot;35%&quot;&gt;&lt;span style=&quot;font-family: arial; font-size:15px;&quot;&gt;&lt;strong&gt;{seller}&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
</pre>
<p>Now if we go back the the merch.php file, and scroll up until we find where $seller is being set we will find something like this:</p>
<pre class="brush: php; first-line: 1469;">
$seller = print_username($res_project_user['user_id'], 'href', 0, '', '');
</pre>
<p>Now we would want to update this code to looke like this</p>
<pre class="brush: php; first-line: 1469;">
$seller = print_username($res_project_user['user_id'], 'href', 0, '&amp;profile=1', '');
</pre>
<p> </p>
<p>Now you would just have to do this simple little change all over the place. The trick is finding where you want to do it and everywhere it occurs. How to accomplish this falls outside the realm of this tutorial, but hey, you're an iLancer, which means you'll find a way! The only real problem with this, is when you upgrade your changes will be over-written so make sure you make good notes of where you changed things.</p>
<p> </p>
<p>Hope this tutorial helped some people. Now I turn it over to you, discuss...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.umbrella-development.com/2009/12/member-profiles-default-tabs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Adding to Daily Auction Newsletters</title>
		<link>http://www.umbrella-development.com/2009/12/adding-to-daily-auction-newsletters/</link>
		<comments>http://www.umbrella-development.com/2009/12/adding-to-daily-auction-newsletters/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 01:44:22 +0000</pubDate>
		<dc:creator>Umbrella</dc:creator>
				<category><![CDATA[iLance]]></category>
		<category><![CDATA[Addon]]></category>
		<category><![CDATA[ilance]]></category>
		<category><![CDATA[Premiere]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.grimeygames.com/umdev/?p=76</guid>
		<description><![CDATA[I was recently asked by a client who purchased our Premiere addon how they could update their cron_daily_auction_newsletter email template so that the listing includes whether or not the New projects are premiere only or not. So I thought I would share that information here, incase anyone else has a similar request.
This tutorial is being [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently asked by a client who purchased our Premiere addon how they could update their cron_daily_auction_newsletter email template so that the listing includes whether or not the New projects are premiere only or not. So I thought I would share that information here, incase anyone else has a similar request.</p>
<p>This tutorial is being written for ilance version 3.1.9, while it should stand true for 3.1.8 and the upcoming 3.2.0, you should make sure you pay extra close attention to your files if you aren&#8217;t using a vanilla installation of iLance 3.1.9.</p>
<p>Now, we will want to open up our<strong> class.subscription.inc.php </strong>located in the <strong>root/functions/api</strong> directory of your site.</p>
<p>Next you will want to do a Find (cntrl+f) for <strong>cron_daily_auction_newsletter</strong>, your first location should be around line #1948. This is where the iLance system kicks off who get&#8217;s which daily service auction announcements from the site for their selected categories. Of course this spot in the code really just loads the template from the database and then replaces variable parameters with actual information which is created prior to this snippet of code.</p>
<p><strong>Step 1:</strong></p>
<pre class="brush: php; first-line: 1945; highlight: [1948];">
// email user
$ilance-&gt;email-&gt;mail = $seller['email'];
$ilance-&gt;email-&gt;slng = fetch_user_slng($seller['user_id']);
$ilance-&gt;email-&gt;get('cron_daily_auction_newsletter');
$ilance-&gt;email-&gt;set(array(
'{{newsletterbody}}' =&gt; $messagebody,
'{{total}}' =&gt; count($projectsToSend),
));

$ilance-&gt;email-&gt;send();
</pre>
<p><strong>Step 2:</strong><br />
So now that we have a starting point, we need to scroll back up in the file to around line #1894 <em>(your line numbers may very)</em> where you will find the following code:</p>
<pre class="brush: php; first-line: 1894; highlight: [1948];">
if ($ilance-&gt;db-&gt;num_rows($buyerinfo) &gt; 0)
{
     $res_buyer_name = $ilance-&gt;db-&gt;fetch_array($buyerinfo);&lt;/pre&gt;
$messagebody .= strip_vulgar_words(un_htmlspecialchars(stripslashes($project['project_title']))) . &quot;\n&quot;;

// todo: check for seo

$messagebody .= HTTP_SERVER . &quot;rfp.php?id=&quot; . $project['project_id'] . &quot;\n&quot;;

$messagebody .= $phrase['_category'] . &quot;: &quot; . $ilance-&gt;categories-&gt;title(fetch_user_slng($seller['user_id']), 'service', $project['cid']) . &quot;\n&quot;;

$messagebody .= $phrase['_buyer'] . &quot;: &quot; . $res_buyer_name['username'] . &quot;\n&quot;;

$messagebody .= $phrase['_time_left'] . &quot;: &quot; . $ilance-&gt;auction-&gt;auction_timeleft($project['project_id'], '', '', 0, 0, 1) . &quot;\n&quot;;

$messagebody .= &quot;************\n&quot;;

}
</pre>
<p><strong>Step 3:<br />
</strong>Now we need to edit the code from above. You can put it anywhere in there really, but we will put it after the category for our example. First we will check to see if this is a premiere only auction. Do do this we will write the following code.</p>
<pre class="brush: php;">

if($project['premiere_only'] == 1)
{

}
</pre>
<p>We will then create our additional text if the if statement is valid.</p>
<pre class="brush: php;">
if($project['premiere_only'] == 1)
{
$messagebody .= &quot;Project Type: Premiere Only\n&quot;;
}
</pre>
<p>If we want to keep our listings similar we could add an else statement as well like so&#8230;</p>
<pre class="brush: php;">
if($project['premiere_only'] == 1)
{
$messagebody .= &quot;Project Type: Premiere Only\n&quot;;
}else{
$messagebody .= &quot;Project Type: Standard\n&quot;;
}
</pre>
<p><strong>Putting it all together:</strong></p>
<pre class="brush: php; first-line: 1894;">
if ($ilance-&gt;db-&gt;num_rows($buyerinfo) &gt; 0)
{
$res_buyer_name = $ilance-&gt;db-&gt;fetch_array($buyerinfo);&lt;/pre&gt;
$messagebody .= strip_vulgar_words(un_htmlspecialchars(stripslashes($project['project_title']))) . &quot;\n&quot;;

// todo: check for seo

$messagebody .= HTTP_SERVER . &quot;rfp.php?id=&quot; . $project['project_id'] . &quot;\n&quot;;

$messagebody .= $phrase['_category'] . &quot;: &quot; . $ilance-&gt;categories-&gt;title(fetch_user_slng($seller['user_id']), 'service', $project['cid']) . &quot;\n&quot;;
if($project['premiere_only'] == 1)
{
$messagebody .= &quot;Project Type: Premiere Only\n&quot;;
}else{
$messagebody .= &quot;Project Type: Standard\n&quot;;
}

$messagebody .= $phrase['_buyer'] . &quot;: &quot; . $res_buyer_name['username'] . &quot;\n&quot;;

$messagebody .= $phrase['_time_left'] . &quot;: &quot; . $ilance-&gt;auction-&gt;auction_timeleft($project['project_id'], '', '', 0, 0, 1) . &quot;\n&quot;;

$messagebody .= &quot;************\n&quot;;

}
</pre>
<div id="authorbox">
<h3>About Premiere Only Addon</h3>
<p>Premiere Only Addon for iLance 3.1.9 allows you, the marketplace owner, to select various subscription plan types as Premiere Accounts. Once these are established your marketplace members will have the option to allow only Premiere members to bid on their Service Auctions, which in turn encourages non premiere members to upgrade their accounts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.umbrella-development.com/2009/12/adding-to-daily-auction-newsletters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
