Jump to content

khr2003

Members
  • Posts

    112
  • Joined

  • Last visited

    Never

About khr2003

  • Birthday 03/29/1987

Contact Methods

  • Website URL
    http://www.diy-cms.com

Profile Information

  • Gender
    Male
  • Location
    Australia

khr2003's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I would recommend that you use php alternative to js which is quite the same and I do not see why you use js. Also, it is better to use iframe rather than fbml since the latter will be deprecated in couple of months.
  2. check phpthumb http://phpthumb.sourceforge.net/
  3. that is my intention exactly. I think viperjts10 does not have any problem including the php file, it is the html inside it (and more specifically the style sheet) that needs to be included properly, thus the base tag.
  4. it is not enough to add the page number of the url. what you need also is the row number from the page will read and the maximum number of data rows to be read. So this line (at the top of your code): $sql="SELECT * FROM $tbl_name WHERE forumid=$id ORDER BY lastreply DESC"; should look like this (note the LIMIT part): $sql="SELECT * FROM $tbl_name WHERE forumid=$id ORDER BY lastreply LIMIT $start_numbet, $max_number DESC"; so you either include these number in the url and retrieve them through $_GET, or you calculate them outside the function based on the page number and the $page_rows value. hope this helps
  5. There is a missing curly bracket at the end of your code, aside from that you code looks fine. Are you receiving any errors when you run the code?
  6. That will depend on the types of files that you have. PHP has native support for files with txt or html extensions. If your files are stored in this way you can use the files functions that php has to read files such as file(), file_get_contnets(), fread() then you can search the text using strstr(), stristr(), strpos(). You can also use regular expression to search the text if you want to add an extra layer of complexity to the results.
  7. array_multisort() will reindex numerical associative arrays. Are you trying to assort the first level array or the whole array including all levels down? check out the array sorting functions comparison on this link: http://www.php.net/manual/en/array.sorting.php and see the one the fits your script.
  8. hi try to change the database encoding to utf-8 as well as the browser. Alternatively, if the database is set to another encoding (perhaps to Greek) then try to set the browser to the same encoding as your database.
  9. for a start try to place the post block outside the while loop. why the names of the input is followed by <?php echo $row['pkey']?> ? if you want unique input values try the "id" attribute.
  10. khr2003

    Hello

    welcome to php freaks. I am sure you will find this website a useful resource.
  11. Do you gen any kind of errors? You can use this function simplexml_load_file as a good and simple way of loading xml file. The function is part of the simplexml library but you would need to create an object to use it.
  12. Hi Last week I was designing a theme form my CMS (or actually converting a theme) that resembles twitter design. Since the website layout consists of three columns I faced the issue of the div height. Even if the div height is set to 100%, the div container does not extend to match the longest of the three columns . I have faced this issue previously; however I used different solutions which were not very efficient. I am aware of the idea of Faux Columns and also the idea of setting the parent div height to 100%, but I think both of them do not provide a sufficient solution to the problem. let us cut to the solution. Suppose you have a website layout like this one: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <style> #main-container { width: 1000px; } #left-side-bar { float: left; font: normal 12px arial, sans-serif; width: 200px; background-color: #ddeef6; } #contents { float: left; font: normal 12px arial, sans-serif; width: 600px; background-color: #ddeec8; } #right-side-bar { float: right; font: normal 12px arial, sans-serif; width: 200px; background-color: #ddeef6; } </style> </head> <body> <div id="main-container"> <div id="left-side-bar">Side bar text <br></div> <div id="contents">Lorem ipsum dolor sit amet </div> <div id="right-side-bar">Side bar text</div> <div style="clear:both"> </div> </div> if the any of the tree columns (left-side-bar, contents, right-side-bar) become very long the other div containers will not extend 100% of the parent container. To overcome this I used position, z-index and couple of extra divs. Simply, I will add an extra div to each sidebar which will extends on the whole parent container (main-container) and then using the stack order propriety (z-index) I will place these new divs behind the original menu sidebars. so the former code will look like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <style> #main-container { width: 1000px; /* set this div position to relative so the sub container that has absolute position will extened within it and not the browser*/ position: relative; } #left-side-bar { float: left; font: normal 12px arial, sans-serif; width: 200px; background-color: #ddeef6; /* set position to relative in order for the z-index to be applied to this container */ position: relative; /* set z-index to a high number to keep the container on top of its duplicate */ z-index: 99; } #contents { float: left; font: normal 12px arial, sans-serif; width: 600px; background-color: #ddeec8; } #right-side-bar { float: right; font: normal 12px arial, sans-serif; width: 200px; background-color: #ddeef6; /* set position to relative in order for the z-index to be applied to this container */ position: relative; /* set z-index to a high number to keep the container on top of its duplicate */ z-index: 99; } #left-side-bar-bg { float: left; font: normal 12px arial, sans-serif; width: 200px; background-color: #ddeef6; /* add absolute position to this selector*/ position: absolute; /* add top and bottom margins of the absolute position*/ top: 0; bottom: 0; /* since this is the selector for left menus bar we add the left margin */ left: 0; /* set z-index to 0 to keep it the container lower than the original one */ z-index: 0; } #right-side-bar-bg { float: right; font: normal 12px arial, sans-serif; width: 200px; background-color: #ddeef6; /* add absolute position to this selector*/ position: absolute; /* add top and bottom margins of the absolute position*/ top: 0; bottom: 0; /* since this is the selector for right menus bar we add the right margin */ right: 0; /* set z-index to 0 to keep the container lower than the original one */ z-index: 0; } </style> </head> <body> <div id="main-container"> <--! the background div for the left side bar--> <div id="left-side-bar-bg"></div> <div id="left-side-bar">Side bar text <br></div> <div id="contents">Lorem ipsum dolor sit amet </div> <div id="right-side-bar">Side bar text</div> <--! the background div for the right side bar--> <div id="right-side-bar-bg"></div> <div style="clear:both"> </body> you can use colours or images as a background without any hassle. I have added an elaborate tutorial on my blog, if you would like more detail: http://diy-cms.com/mod.php?mod=blog&modfile=viewpost&blogid=20 Hope this helps.
  13. You can use phpmailer for all sorts of email process with advanced or minimal functionality. It contains a highly advanced SMTP functionality that is can seamlessly integrate into any kind of application it is free and in php
  14. change this line: $str = preg_replace($htmlcode, $bbcode, $str); to this: $str = preg_replace($bbcode, $htmlcode, $str); You need to take the bbcode and convert it into html and not otherwise.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.