|
|
|
|
I finished with this, it would help me to administrate all my media files that i would publish here.
Example: http://www.zseven.net/multimedia/view/20080817155900
Base URL: http://www.zseven.net/multimedia |
|
|
|
|
|
|
|
|
Like you see i almost done with the tasks. I have to reorganizate everything because of the new way of ge the language, that is really comfortable.
The RSS is working, again our sponsor is FeedBurner.
To have an idea of how to make a RS you just need to create a new file (in my case with .php extension) and make a print in it of all the news, after that link it with FeedBurner.
Remember that the RSS should be XML files, so before put your PHP code (we save it as PHP so we want it that work as it) you should put the next labels:
<?
header("Content-type: application/xml");
echo "<?";
echo "xml version=\"1.0\" encoding=\"iso-8859-1\"";
echo "?>\r\n";
echo "<?";
echo "xml-stylesheet type=\"text/css\" href=\"".$style."\"";
echo "?>\r\n";?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
// Here should be your code for the RSS
</channel>
</rss>
* Its a simple way to do it, where your PHP should print the records of the database should be between the labels <item></item>, read something about how to do RSS and you would understand me.
Also i finally implemeted the code to not html insertions in my comments and with this dont allow to the users to insert images or frames with inappropiate webpages. And a code that dont allow to make PHP injections, this were teach it by Hsilamot, this is a little paranoic with the safety and he have amazing results with ALL his methods.el es un poco paranoico con eso de la seguridad y ha tenido muy buenos resultados con TODOS los métodos que utiliza.
<?
function nospammers($code){
$s1=array("&", "<", ">");
$s2=array("", "", "");
return str_replace($s1, $s2, $code);
}
function nophpinjection($code){
$s1=array("'", "\"");
$s2=array("\'", "\"");
return str_replace($s1, $s2, $code);
}
?>
* The codes only replace symbols. In the HTML code it replace HTML labels for nothing making all plain text. In the case of the injections code it replace the quotes of any kind for quotes that cant be manipulated to make an injection.
The WDB structure (Web-data-base) is just to edit all the frames that you are seeing, just making a relation between the friendly urls and the data base.
The other things you already know them and also i need to develop somethings else.
This website had been test in the next browsers (% of efficient):
95%
100%
95%
95%
98%
* The variations are about tables interpretations. |
|
|
|
|
|
|
|
|
Since now this website use cookies, i decided that have yoursite.com/es or yoursite.com/en (the language) didnt seems nice.
Now i use cookies to save the preferences of language of the user, if you want to know how read this: (actually are sessions i think that are more safety than the cookies)
<?
// Session start
session_start();
// If the user want to change the language the variable 'language_of_user' from the URL should have it
if($_GET['language_of_user']=="") {
// This verify that the session doesnt have another language
if($_SESSION['language_in_session']=="") {
// If it doesnt have it, the code take it from the browser
$language_default=substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0, 2);
// In my case i just use two languages, so if the browser are not any of this it take English as a default
if($language_default=="es"){ }
if($language_default=="en"){ } else { $language_default="en"; }
} else { $LANGUAGE=$_SESSION['LANGUAGESESSION'];
if($language_default=="es"){ }
if($language_default=="en"){ } else { $language_default="en"; } }
} else {
// If 'language_of_user' have a language it take it over everything else in the session.
$language_default=$_GET['language_of_user'];
$_SESSION['language_in_session']=$language_default;
}
?>
I hope that this will help you, if you have some doubts you can read the last article about this topic. |
|
|
|
|
|
|
|
|
Like you see my flv player works without any troubble, you can download if you want it here:
http://rapidshare.com/files/131760630/22072008z7.rar
Source: http://www.jeroenwijering.com/
And the code:
<embed src="player.swf" width="300" height="250" allowscriptaccess="always"
allowfullscreen="true" flashvars="file=file.flv"/></embed>
With this script i want to do a multimedia system where i can put all my videos, photos and sounds, more advanced that anything that i ever done but very funtional, the idea is that it give me the code just to paste it here and also give it to you.
Note: You can customized this player with logotype, colors, and other things just changing this line:
flashvars="file=file.flv&screencolor=0x000000&logo=logo.png&link=http://www.zseven.net" |
|
|
|
|
|
|
|
|
I have some, but not all. I finish something that come to my mind, “Notes”, in this section I will write my projects and all I finish,
In this moment you can register in the webpage, but you still cant log in. But is something.
I start the shop, but I need to finish the registration, I will use it to the shop. |
|
|
|
|
|
|
|
|
Yesterday i dont remember. Like a last detail of my update, i made the webpage to 4 browsers:
Firefox
Opera
Internet Explorer
Safari
Is strange how you "do" a webpage to different browsers, but is true.
To them who dont know every browser have a different codification (talking about Internet Explorer), a few use the standards. Thats way the Internet is how it is..
And with this, i get out Opera of my list, showing that is a browser of shit. Now i declare that i use Firefox, to the explorer domination. |
|
|
|
|
|
|
|
|
Another day, another coin. Someone saids that one time, but for me the day per day is if i done something that bring me something good later.
Today I development a little more the blog that are in front of your eyes. The search engine works, the curriculum section, leaving more to do.
All the day it spend it in making that a PHP code create a PDF of what i want. In this case I made it with a script call HTML2(F)PDF, is an adaptation of the original HTML2PDF.
I try three library’s and this was the only, unless to me, that give me what I want.
Link: http://rapidshare.com/files/123722818/20062008z7.rar
* If you want to have it.
I made it adaptations, the one that you are going to download is the original. The creator feels funny adding advertise of his website at all PDF creation, he is a subdevelopment, but I don’t going to discuss. Here is his rights:
http://html2fpdf.sourceforge.net/
* If you gonna use it take on count that the PHP you gonna do is the executable, it make a direct download, don’t try to include it on a webpage. Put it like a link.
* Sometimes is helpful use something already development, but in my personal opinion, i dont like the ones that make them call developments and use Wordpress (great utility).
Why did i use PDF?
I like to be like some blogs of forums that give you the option to download it articles or discussions in PDF. In this case I use it to the Curriculum section, to generate a PDF with it if the user wants it. Is a good training.
If you need help to edit it, let me know at comments. |
|
|
|
|
|
|
|
|
Today has been a productive day for my blog and mi knowledge about it. I should be studying for Circuits or doing my Lionbridge exam but I am here.
Today I finished many thing, I made you a list with the percent of working:
- Home 100%
- News 90%
- Categories 100%
- Comments 90%
- Recommend us 100%
- News file 100%
- Profile 100%
- Curriculum 0%
- Links 50%
- Contact 5%
- Search 5%
- Login 0%
- Shop 0%
- Calendary 0%
All that have more tan 80% already work and can be used by you. Like you see i add new Project to implement in my blog, all to trying.
I can say that i have the better codification that i ever made, but it still have details to fix.
The webpage will be and is until this moment 100% friendly.
I been having troubles with PandaSux with some mischievous that believe that put frames is make Hack to a website. I implement a protection of the use of HTML codeo n my comments.
I hope all is of your like.
What if friendly?
Is dont have this http://www.zseven.net/news.php?id=1 have this http://www.zseven.net/news/Welcome
What is iframe?
Read a HTML manual, is like a window in another window..
How can I protect my data base in a simple way?
In a simple way you can substitute all the characters that use in HTML and PHP like “<” and “>”. It substitute will be “”. Example of the code:
function myprotection($texttoedit){
$substituteto=array("&", "<", ">");
$substitute=array("", "", "");
return str_replace($substituteto, $substitute, $texttoedit);
}
I hope that be useful. |
|
|
|
|
|
|
|
|
Today i put all the links on the webpage, but still don’t work.
Behind I see the way that the pages have two or more languages, giving to the user the choice.
Now I made that the language has been choose automatically.
How it works?
Take the language that the Internet browser has been configured and tell to the webpage to it put in that language (if we have avaible the language).
This save some values time of our life.
* In the case that the users don’t configure the browser language appropriately, the language can be change at the final of this page.
The development is very simple, i put the script on the line 0 on my index. If you want to use my script you can see it now:
<?php // The variable $SERVER['HTTP_ACCEPT_LANGUAGE'] give us the language of the browser in the code of the same browser.
$language_browser = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
// This code take the first two letters of the variable $language_browser In this case this are different even each language. Example: “en” english.
$language_browser_new = substr($language_browser, 0, 2);
// Now make a condition, $language_browser_new have our language, if this are equal to “es”, make the variable $language equal to “es”, if it is equal to “en”, make the variable equal to “en”, but in case that are not of this (because the language’s are not avaibles) make the variable equal to “en” (English, our predetermined language). if($language_browser_new=="es"){ $language = "es"; } else {
if($language_browser_new=="en"){ $language = "en"; } else { $language = "en"; }
} ?>
Then, here finish our code.
* Remember that here I need that make equal the language, but in your case you can use the function header to redirect to some page, example: english.php .
My languages url’s are the next:
http://www.zseven.net/en - English
http://www.zseven.net/es - Spanish
We hope that some day expand this. |
|
|
|
|
|
|
|
|
I start with a new system for the blog, as it will be realize. This will give me pore possibilities of grow than the previous one, give me more control over everything.
I’ve been very careful developing, with the best code possible, more subtle. That’s why it takes me more time than usual.
I must inform that the present operates on 25%, almost all present at this window that you are watching.
The system of multi-language works but I am unable to enable it until I complete the entire blog.
Any link works at this moment, so do not try to click them, simple read, for the moment, as I finalized more sections I will inform in this category, specially for the handling of the blog.
An extra date, recently I made a new category “My files”, will be to put all that software that changes the surfing, design or simple the way to be in the PC.
For all those who are really interested seeing quality software as well as I do you can consult it here.
Remember that all this software is in a information way, help us to see if the software are really useful, and we are not buying something that dont help. |
|
|
|
|
|
|
|
|
I decided to give a final twist to this website, I don’t finish jet but today I made the most difficult.
As you see, I added the possibility of surf in two languages. My English are not the best and my Spanish neither, but is an opportunity to expand my visits and that ones that not visit me jet.
This is a prototype that will take me to reloaded all my other websites that I found that need it.
Im sure that I learn something of this, im sure that the English are not sufficient to express what you can express with the Spanish, but because of the globalization I can close to start to make this kind of websites, specially if are about work, curricula and projects, out of that capacity.
Its more probable that the world know English that Spanish I guess. But is good to become familiar with the language.
Apart from all this I will make a decent blog of this, not a diary, a blog. |
|
|
|
|
|
|