Friday, October 28, 2011

Visual Studio - Building vs Rebuild Solution vs Compile

http://stackoverflow.com/questions/1247457/difference-between-rebuild-and-clean-build-in-visual-studio-2008


Build means compile and link only the source files that have changed since the last build, while Rebuild means compile and link all source files regardless of whether they changed or not. Build is the normal thing to do and is faster. Sometimes the versions of project target components can get out of sync and rebuild is necessary to make the build successful. In practice, you never need to Clean.

Build or Rebuild Solution builds or rebuilds all projects in the your solution, while Build or Rebuild builds or rebuilds the StartUp project, "hello" in the screen shot above. To set the StartUp project, right click on the desired project name in the Solution Explorer tab and select Set as StartUp project. The project name now appears in bold. Since the homework solutions typically have only one project, Build or Rebuild Solution is effectively the same as Build or Rebuild .

Compile just compiles the source file currently being edited. Useful to quickly check for errors when the rest of your source files are in an incomplete state that would prevent a successful build of the entire project. Ctrl-F7 is the shortcut key for Compile.

C# Intro Tutorials

I like to get a different perspective when I learn ... so I can see how other people might present the same type of info ... because sometimes you will find a site that goes over the basics WAY BETTER than other things ... and I'm ALL ABOUT SAVING TIME and learning with SPEED, not the long way ...

#1 looks pretty nice, they way he's giving us different single things to explore...


1) http://www.csharp-station.com/Tutorial.aspx
(C# Station Tutorial. This is a set of lessons suited for beginning to intermediate programmers or anyone who would like to gain familiarity with the C# programming language.)



2) http://msdn.microsoft.com/en-us/library/aa288436%28v=vs.71%29.aspx
(Visual Studio .NET 2003)



3) http://www.youcanlearnseries.com/programming%20Tips/csharpmain.aspx

(C# Tutorial, Tips and Tricks of the Professional C# Programmer)

Wednesday, October 26, 2011

SESSIONS in Joomla - in CUSTOM PHP pages

http://thowfeekmk.blogspot.com/2011/07/joomla-session-handling-within-external.html

.htaccess - page load time - Cut In Half

http://www.kiveo.net/blog/speed-up-your-site/

.htaccess (below)


Also Meet PHP Speedy


--------

HTACCESS stuff:

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$">

#Set everything that *probably* isn't dynamically generated to
#be cached by the browser for two weeks

Header set Expires "access plus 2 weeks"

#Unset ETags for everything that *probably* isn't dynamically
#generated

Header unset ETag
FileETag None

</FilesMatch>

# Gzip all text-based files
<FilesMatch ".(php|html|css|js)$">
SetOutputFilter DEFLATE
</FilesMatch>

Sunday, October 23, 2011

Joomla 1.5 - SESSIONS

---
SESSIONS in Joomla - JSession

** nothing in it by default **

$session =& JFactory::getSession();
echo "<pre><b>Joomla session var</b><br>< br>";print_r($user);echo "</pre><br><br>";

--

http://docs.joomla.org/JFactory/getSession

>> The following code gets the current session then sets the value of the session variable 'myvar' to 'helloworld'.

$session =& JFactory::getSession();
$session->set( 'myvar', 'helloworld' );

>> The session variable can be retrieved later in a similar way.

$session =& JFactory::getSession();
echo 'Session variable myvar has value: ' . $session->get( 'myvar', 'empty' );


(more options, using their classes)
http://docs.joomla.org/JSession/1.5

Saturday, October 22, 2011

Joomla 1.5 - HIDE CONTENT registered vs guests

Joomla 1.5 - HIDE CONTENT registered vs guests

http://www.goodwebpractices.com/joomla/hide-content-from-certain-users.html
THIS IS AN AMAZING BLOG ENTRY!!


Hide content from guests When building a website with Joomla 1.5, you might need to hide content from registreted users and guests. When we were recently building a website with Joomla 1.5, we came across the 3 options:

In this post we will be discussing the pros and cons of each of these plugins and explaining how to make RokAccess work in Joomla 1.5.

Hiding content depending on whether a user is a registered member or a guest is a really useful feature to have. Fortunately, there are a number of different options available set content permissions in Joomla 1.5...

JoomiHide

How JoomiHide works

This is the simplest plugin available for Joomla 1.5 to hide content. Although it's simple it works seamlessly for showing content either to registered members or guests.

Content in an article can be restricted to be displayed to certain visitors by adding these tags:

{reg} This content is only displayed to registered users logged in {/reg}
{unreg} This content is only displayed to unregistered users or non-logged in users {/unreg}

When content is restricted for non-members, this plugin replaces the restricted text with: "To view rest of this section, please login or register". This is a nice feature but a little annoying to have it displayed each time content is not displayed. To remove or edit this text, you can hack the plugin by changing the html code on line 108 of joomihide.php which is in /plugins/content/.

Unlike content restricted for non-members, when content is not shown to registered users there is no text added.

Pros

  • Simple

Cons

  • Downloading this membership at HowIDid Academy which will set you back $10 for 3 months.
  • Content can only be hidden to members and non-members: There is no option of showing content to administrators or other Joomla groups
  • Need to hack the plugin to remove or change the text displayed when content restricted for guests

Click here to see what other people are saying about JoomiHide. Click here to download this plugin.

Ninja Access

How Ninja Access works

Hide content using this plugin by surrounding the content you want to be seen by certain groups in a tag. Ninja Access uses numbers to specify which group the content includes:

{njaccess 0} Shows this content only to guests {/njaccess}
{njaccess 18,19,20,21,23,24,25}
Shows this content to all users who are guests {/njaccess}
{njaccess 24,25,30,31}
Shows this content to administrators and 2 custom groups created in JACL {/njaccess}

When content is not shown to a particular group, the text is simply hidden.

As you can see from the examples above, you need to know the default Joomla GroupIDs: 0 - Guest, 18 - Registered, 19 - Author, 20 - Editor, 21 - Publisher, 23 - Manager, 24 - Administrator, 25 - Super Administrator.

Pros

  • Very complete plugin for hiding content for specific groups including groups created with JACL
  • Great support from the Ninjoomla team

Cons

  • You need to have the GroupIDs at hand when you use this plugin.
  • Downloading this requires Silver Membership at NinJoomla which will set you back $30.

Find out more about Ninja Access here.

RokAccess

RokAccess is an extremely popular plugin for Joomla 1.0, but hasn't yet been updated for Joomla 1.5. Thanks to Lukas White, we managed to get RokAccess working in Joomla 1.5.

How to get RokAccess working in Joomla 1.5

After installing the Joomla 1.0 RokAccess extension on your Joomla 1.5 website, you will need to change the rokaccess.php file which is located in /plugins/content/

There are 3 changes you need to make to this file:

$_MAMBOTS->registerFunction( 'onPrepareContent', 'botRokAccess' );
Change to:
$mainframe->registerEvent( 'onPrepareContent', 'botRokAccess' );
function botRokAccess( $published, &$row, &$params, $page=0 )
Change to:
function botRokAccess( &$row, &$params, $page=0 ) {
Delete:
if (!$published) {
$row->text = preg_replace( $regex, '', $row->text );
return;
}

How RokAccess works

To hide content using the RokAccess plugin you add the RokAccess tag to the content you want to hide. Here are some examples:

{rokaccess guest} Shows this content only to guest users {/rokaccess}
{rokaccess !guest}
Shows this content to all users who are not a guest {/rokaccess}
{rokaccess registered}
Shows this content to all users who are registered {/rokaccess}
{rokaccess guest,!editor}
Shows this content this to all guests and members who are not editors {/rokaccess}
{rokaccess editor,special}
Shows this content to editors, administrators, and superadministrators {/rokaccess}

In similarity to Ninja Access, when content is not shown to a particular group, the text is simply hidden.

Pros

  • Free
  • Complete

Cons

  • You need to hack the plugin files to get this working in Joomla 1.5
  • No support

Click here to see what other people are saying about RokAccess. Click here to download this plugin.

Which should plugin should you choose?

It just depends on what your needs are. We recommend you choose the plugin you're comfortable using... If you don't want to hack any files and need support with getting the plugin to work, we recommend you use the Ninjoomla plugin.

Do you have any experience with these plugins? We welcome your comments below.