Archive for the 'Web programming' Category

Redirection Loop

Well, yesterday I was trying to post something and I couldnt. That was because the WordPress was making an infinit loop in the process of redirection for permanent links. It was very aweful, but today I tried to fix it. I did it! As you can see there is no more problem, the page is loading correctly and all links working. Why?

If you have on your Permalinks configuration:

/%category%/%postname%/

You have to change it to:

/%category%/%postname%

The difference? The last character. That might fix the problem on WordPress :)

I wanna be a Front End Engineer

That is my reality. I really enjoy learning CSS and xHTML coding and layouting web designs. Also I know PHP language, let’s say at 50% of its 5.x version. I need to learn a lot of things, syntax, functions, and some properties. About the interaction with databases I only know MySQL connections, and that is nothing! I’m a bi sad about this, because I’m getting old, I’m 18 and I dont know Postgre or OMDB… And neither the cURL module. I just know some basics about them.

I need your help. If you have some work for me, I’m right here, you can contact me. If you just have a comment to say, right it here without hesitate.

By the way, you can learn with me. I give you some interesting links:

Of course I need to interact to someone who speak English. I’m going to travel to New York on January, so… That could help me so much. Thanks a lot for reading.

P.S.: I dont know why, I was having problems to post this correctly. About this, the next post.

How to highlight menu item with ASP

This is a non-ASP.NET tip.

You have to write some code to difference the active item from the rest… The CSS:

ul, li {
/* … some style you want */
color:#000066
}
.active { color:#0000CC }

And the page code…

<%
pag = request.servervariables(”URL”)
strPosA = InStr(1, pag, “Default”, 1)
strPosB = InStr(1, pag, “Contact”, 1)
strPosC = InStr(1, pag, “Software”, 1)
indexOn = “”
contactOn = “”
softOn = “”

If strPosA <> 0 Then
indexOn = ” class=”"active”"”
ElseIf strPosB <> 0 Then
contactOn = ” class=”"active”"”
ElseIf strPosC <> 0 Then
softOn = ” class=”"active”"”
End If
%>

<div id=”nav”>
<ul>
<li><a href=”./”<% Response.Write(indexOn) %>><span>Home</span></a></li>
<li><a href=”./software.asp”<% Response.Write(softOn) %>><span>Our App</span></a></li>
<li><a href=”./contact.asp”<% Response.Write(contactOn) %>><span>Contact us</span></a></li>
</ul>
</div>

So with this, when you are on the main page, you will see the Home button / link with a blue color, different than the rest (to make sure you are in that page). And if you change to Software Page the blue item will be Our App…

The reference for PHP highlight is:
http://www.crucialwebhost.com/blog/you-are-here-using-php-to-highlight-navigation/