Close Panel
Hello Guest! | Log In


lheader.gif rheader.gif
tgcontentlogo.gif
tgcontentlogob.gif
Posted by err0r on June 9th, 2008

There are many ways to get the file extension of a file. Here is an example of a php function I found to do just that.

<?php
function file_extension($fname)
{
$path_info = pathinfo($fname);
return $path_info[‘extension’];
}
?>

Another way would be to check the actual string and use what’s after the last slash. I picked this up on a forum I visit.

<?php
$filetype = substr($file, strrpos($file, ‘.’) + 1);
?>

Posted by err0r on June 3rd, 2008

One of the many questions I get asked by other website developers is how do I post news on the main page with icons. My method was to build a mysql table with the information for the icons I wanted. As you will see in the News Icons control panel, I have the ability to add news icons. The form allows me to not only upload the image I want to use but it also sets an entry into my database. I use the thread’s Topic Description as a way of deciding what icon to use. So if the description was TechGear News it would know to use the TechGear News icon that I set in the database. Here is a picture of the news icon control panel.

News Icon CP

Now to make the process of posting news and making sure I set the right text for the icon, I built a small form. The form includes a dropdown list of all the different identifiers to use in the topic description. The dropdown list pulls the info from the database table I created so when a new one is added it is automatically included in the list. The form is a popup that you can access from techgear’s main page if you have the proper rights. This is a picture of the form.

Post News

Here you enter the topic, text, source, and icon to use. It also includes some basic bbcode functions if needed. The form also uses a bit of IPB SDK in order to easily create the post. Once you have filled out the form you click submit and the popup will close and the site will refresh to show the latest article.

I hope that helps out other users that are looking to do something similar.


Posted by err0r on June 2nd, 2008

As you may have noticed I have decided to use WordPress as the backend for the development blog. I can’t say enough good things about wordpress. I have used it on several sites and I must say if you are looking to build a simple site you can’t go wrong with wordpress. As you can see you can easily implement a custom theme. There are literally hundreds of themes and addons available for wordpress. For all you portal users, you should seriously think of giving a wordpress a try.

Hope everyone enjoys the new dev blog.


Posted by err0r on June 2nd, 2008

Hello and welcome to the new TG007 development blog. Here we will share information about the continuing development of techgear. We plan to give you a look inside the world of design as well as information we have learned along the way. Here you will learn about the coding and tools we use to keep techgear growing.

Note: This is not a help resource. This is simply a dev blog about the site. If you need help please use our forums.






31 user(s) currently browsing site (1 members, 30 guests, 0 anonymous)


Warning: Cannot modify header information - headers already sent by (output started at /home/tg007net/public_html/blog/wp-content/themes/tg007/header.php:3) in /home/tg007net/public_html/scriptsocket/roomlist.php on line 2
13 Users in IRCommunity
inføвøт, err0r, «Chãin™», ♥fiestýβสbỳ♥, båbyġurł, DennieWennie™, Enya, Spike1506, Timeless, «·Ħåĺø·», ﴾Ɣ﴿ⓨⓢⓣⓘⓒ★§ⓟⓔⓛⓛ, danger , [☠] Ƙʀʏᴘтιӿ [☠]



lhfooter.gif
Valid XHTML 1.0 | Valid CSS | Load Time: 0.367288 sec(s)
rfooter.gif

Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /home/tg007net/public_html/blog/wp-includes/script-loader.php on line 725

Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /home/tg007net/public_html/blog/wp-includes/script-loader.php on line 597