Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. In your style.css are these rules #sitename { font-size: 60px; color: #7272DE; padding: 20px; text-align: center;} #banner { margin-left: 210px; background: #000; text-align: right;} Yet when viewing the header.tpl file I do not see these rules applied <!-- START BLOCK : header --> <body> <div id="{page_id}"> <div id="leftcontainer"> <div id="maincontainer"> <div id="leftcolumn"> <div class="leftblock"> <div class="lefttitle"><div class="lefttitle2">{menu2_title}</div></div> <div class="blockbox">{menu2_content}</div> </div> <div class="leftblock"> <div class="lefttitle"><div class="lefttitle2">{random_title}</div></div> <div class="content">{random_content}</div> </div> {login_title}{login_content} </div> <div id="banner"></div> <div id="skincontainer"><div id="skincontainerB"><div id="skincontainerC">{menu_content}{skinchange_content}{rss}</div></div></div> </div> <div id="mainpage"> <!-- END BLOCK : header -->
  2. Need to show the code that actually does the pagination.
  3. css .centeredImage { text-align:center; margin-top:0px; margin-bottom:0px; margin-right: auto; margin-left: auto; padding:0px; } html <p class="centeredImage"><a href="http://site.com"><img src="http://site.com/images/default.png" alt="Logo" style="max-width:98%;max-height:90px;"/></a> </p>
  4. You don't need to add a href link, place a hidden field in the form. <input type="hidden" name="click" value="yes">
  5. header() must be used before any output is displayed. I don't see anywhere in your header.php code you posted that SYSTEM_HELPER.PHP is included or your redirect function is being called upon.
  6. Maybe should be looking at the developers site and also wordpress related. If this was made as a plugin everything should be included to work, possibly they require a special custom theme to work right. To try and make this simple, adding functions to theme itself or use as a plugin that injects into themes.
  7. Pretty much you have to query the counts sorted in the order you desire. Then fetch the post_id's information for each so is something of value to show and possibly click on as well.
  8. Is my understanding you want the totals for votes somewhere like the sidebar and to refresh every so often. Is no need to modify the current script have, that either adds a vote or not upon casting a vote via POST. You need to write a script to query and fetch all the results, can use a header or meta refresh and include or iframe the script in a sidebar text widget. I would think refreshing it more often be needed as well. Must be before any output at the beginning of the script. header( "refresh:30;url=script_name.php" ); Meta does not need to be at the beginning. <meta http-equiv="refresh" content="30;URL='http://site.com/script_name.php'" />
  9. Are you aware you just need to have the video id and and use it in place of video_id any one of the following urls for the image? http://img.youtube.com/vi/video_id/0.jpg http://img.youtube.com/vi/video_id/1.jpg http://img.youtube.com/vi/video_id/2.jpg http://img.youtube.com/vi/video_id/3.jpg
  10. If you need to stay on the page and reload only that look into jquery or ajax codes pertaining to it, otherwise can use a form with POST or GET so it loads your specific image size requested. That will reload entire page with the set image size. You can use css to change the image being displayed or even gd or imagmagic and store these images for future use. Is quite a few image resize scripts around. Then can cache the images.
  11. I'm pretty sure is an ads related script from media.net. They have an error their script where is supposed to be parsed and not downloaded.
  12. Wordpress can be installed in root, subdomain or directory. Can follow the instructions here. https://codex.wordpress.org/Installing_WordPress
  13. You also want to never use a negative value so if less than 1 make it one again. if($page < 1){ $page = 1; }
  14. You want to see if page is set in the GET and not empty, otherwise set it to 1 if(isset($_GET['page'] && trim($_GET['page'] != '')){ $page = $_GET['page']; }else{ $page = 1; }
  15. $command is returning /task So... don't add the slash as are doing. $this->logger->addInfo($this->server['ip'].' xxx '.$command.' xxx '."{$this->server['ip']}$command");
  16. Jacques is correct, just need to add the GET parameter to that url. x= in his example Personally I rawurlencode() them if urls I'm adding as a value of a parameter, then rawurldecode() them back for my code when displaying. If showed some code and we had an idea what are actually doing may be better methods. Such as storing the urls in a database and using an id parameter with a number in the url.
  17. I get what you are trying to accomplish, maybe should be looking into a more dynamic pagination system. Another member made one and shared it. http://forums.phpfreaks.com/topic/291074-php-mysli-pagination-with-items-per-page-select-option/?hl=%2Bhttp_build_query&do=findComment&comment=1491152
  18. Try this function. $url = filter_var("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'], FILTER_SANITIZE_STRING); if (!empty($_SERVER["QUERY_STRING"])) { $query_string = filter_var($_SERVER['QUERY_STRING'], FILTER_SANITIZE_STRING); $url .= "?" . $query_string; } If you are manually building the parameters use http_build_query() Is a few ways can go about changing the GET parameters value, either replace if exists, unset if exists and then define it as a variable and use the http_build_query.
  19. One thing I notice is you are saving full youtube urls in a database? Just save the video id. I have a pile of functions for extracting just the id all varieties of youtube urls. If need something for that, PM me. Now for the code... Are you upper casing the words in the url and then looking to replace a lower cased /blog/ with nothing? $url = str_replace('/blog/', '', ucwords($url)); There is a case insentitive version of that. str_ireplace() For the rewrite, if don't want to view the directory /blog/ in the url then replace it something like this rule. RewriteCond %{THE_REQUEST} ^GET\ /blog/ RewriteRule ^blog/(.*) /$1 [L,R=301]
  20. Almost forgot... scholarship, medium, extremely Another thing is when making functions is to handle if something is empty or not data you expect, such as not being a number.
  21. You are wrapping the entire html in the while loop. $Scholerships is not an array. Can make it an array and use it later like this. <?php session_start(); include("config.php"); function showColor($number) { if ($number == 1) { $color = "red"; $word = "Low"; } if ($number == 2) { $color = "green"; $word = "Midium"; } if ($number == 3) { $color = "blue"; $word = "High"; } if ($number == 4) { $color = "orange"; $word = "Very High"; } if ($number == 5) { $color = "violet"; $word = "Extreamly High!"; } return "<td style='color:$color';>$word</td>"; } $sql = "SELECT * FROM " . $SETTINGS["data_table"] . " WHERE id>0 LIMIT 10"; $sql_result = mysql_query($sql, $connection) or die('request "Could not execute SQL query" ' . $sql); $Scholerships = array(); if (mysql_num_rows($sql_result) > 0) { while ($row = mysql_fetch_assoc($sql_result)) { $Scholerships[] = $row["Scholerships"]; } } else { $Scholerships[] = "fail"; } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Show color</title> </head> <body> <div> <table style="width:191px;"> <tr> <?php foreach ($Scholerships as $thecolor) { echo showColor($thecolor); } ?> </tr> </table> </div> </body> </html> If you want to do directly in the while loop break in and out of php and html just in the <body> section. Use the $row data. Should look into using css for styling it all. mysql_ functions are deprecated, should be using mysqli_ or pdo with prepared statements.
  22. Font has been deprecated a long time, use css style or style right in the html. I would suggest using rgb or hex versus normal colors so can do them all. I don't know how simple or advanced your application will be. If you need functions to use and convert to different color display formats let me know. Here is a simple example using a function to change the colors. <?php function showColor($color){ if(!isset($color) || empty($color)){ $color = "black"; } return "<p style='color:$color';>$color</p>"; } //dummy data $colorarray = array("red","orange","yellow","green","blue","indigo","violet","not-a-color"," "); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Show color</title> </head> <body> <div> <?php foreach($colorarray as $thecolor){ echo showColor($thecolor); } ?> </div> </body> </html>
  23. Is your log file being written to? This is location you have, is it still that location? $log_file = '../logs/avatar_log.txt';
×
×
  • 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.