Jump to content

Vini

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Vini's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ive tried [code]             <h3>Affiliates</h3> <div class="itemside">    <ul> <?php include ('/home/jamesv/public_html/wordpress/wp-content/themes/vini/sidebar_recent.php'); ?>    </ul> </div> [/code] and [code] <h3>Affiliates</h3> <div class="itemside">    <ul> <?php /home/jamesv/public_html/wordpress/c2c_get_recent_posts ($num_posts = 10, $format = "%post_title%<br>", $categories = '', $orderby = 'date', $order = 'DESC', $offset = 5, $authors = '', $include_passworded_posts = false); ?>    </ul> </div> [/code]
  2. [a href=\"http://www.jamesvincent.co.uk/forum/\" target=\"_blank\"]http://www.jamesvincent.co.uk/forum/[/a] you will see under Affiliates on the left side, ive tried to call a function 'get_links' from Wordpress... is it possible to call a function from Wordpress in this way?
  3. [code] <?php header("Content-type: image/png"); //change this to the number of random quotes you want (for example if you had 15 quotes it would be $number = rand(1,15); $number = rand(1,9); //change your random quotes here if($number==1)$string2 = "all your base r belong 2 us"; if($number==2)$string2 = "somebody set up us the bomb"; if($number==3)$string2 = "Resistance is futile"; if($number==4)$string2 = "R0D3NTS are cute"; if($number==5)$string2 = "H4X0R in thE yur PC1?!"; if($number==6)$string2 = "Dude w3re's my c4r?"; if($number==7)$string2 = "s0m3on3 st0l3 my mega hurtz!!"; if($number==8)$string2 = "move zig for great justice"; if($number==9)$string2 = "Rodents make the world cool"; //put your image name here (must be a png) $im = imagecreatefrompng("idudesays.png"); //change your text color here ( must be the hex value) ex. 255,255,255 would be white $color = imagecolorallocate($im, 100, 100, 100); //change your X & y coordinates here to place the text on your image where you want it //(these will center the text on a 400x100 image) $px=90; $py=12; //no need to touch this unless you know what your doing imagestring($im, 3, $px, $py, $string, $color); imagestring($im, 3, $px, $py+12, $string2, $color); imagepng($im); imagedestroy($im); ?>[/code] is something i found which reads from the file, but
  4. [!--quoteo(post=371533:date=May 5 2006, 09:09 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 5 2006, 09:09 AM) [snapback]371533[/snapback][/div][div class=\'quotemain\'][!--quotec--] I'm not completely sure I understand the question or how it relates to your dynamic image script, but you should look into fopen(), fread(), fwrite() for reading and writing text files. [/quote] I have done, and they dont mean anything to me :S Im after listing quotes line by line in a text file, which i will read randomly and display on the image.
  5. I've currently got a dynamic image setup, but i want it to read & output lines from a text file. instead of accept the form input. Im no coder so not sure where to begin, anyone shed any light? Below is the code for my [a href=\"http://www.vini.co.uk/dyn/\" target=\"_blank\"]DynaPic[/a] [code]<?php header("Content-type: image/png"); $string = $_POST['quote']; $im    = imagecreatefrompng("idudesays.png"); $colour = imagecolorallocate($im, 100, 100, 100); imagestring($im, 3, 90, 23, $string, $colour); imagepng($im); imagedestroy($im); ?> [/code]
  6. Im wanting to achieve the below: [img src=\"http://www.vini.co.uk/uploads/forumpress.jpg\" border=\"0\" alt=\"IPB Image\" /] [code=php:0]<?php /* Template Name: Forum */ ?> <?php get_header(); ?> <div id="main"> <<<< INSERT FORUM INCLUDE?? CODE?? WHAT?? >>>> </div> <?php get_footer(); ?> <?php get_sidebar(); ?> </body> </html> [/code] the above, is a blank template for my wordpress theme, is there anything i could include in there to get the forum looking like the picture? an iframe does the job i want, but iframes are rubbish. i dont want the scroll bars and hassle that they bring. ive tried an include but all the links and css goes to pot for the forum. any ideas on a way to do this? people have mentioned <div> but never gone into detail. i must admit i know nothing when it comes to this kind of coding, so need someone to hold my hand/show me a sample/go into stupidly deep detail :(
  7. Register.php3 [code]<?php function showheader ($title) { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <TITLE> <?php echo $title ?> </TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <CENTER> <?php } function showfooter () { ?> </CENTER> </BODY> </HTML> <?php } mysql_connect("localhost", "root", ""); mysql_select_db("users"); if ($Password == $Password2) {     $user = mysql_query("SELECT * FROM personalize WHERE (Name='$Name')");     if (mysql_num_rows($user) > 0) {         showheader("User Name Taken !");         ?>         We are sorry to inform you that the User Name <B><?php echo $Name ?></B> Is already Taken.         <?php         showfooter();     }     else {         $user = mysql_query("INSERT INTO personalize VALUES ('$Name','$Password','$News1','$News2','$Weather')");         setcookie("site_user", $Name, time() + 31536000, "/");         setcookie("site_pass", $Password, time() + 31536000, "/");         showheader("Registration Success!");         ?>         You have registered.<BR>         User Name: <?php echo $Name ?>         <BR>         Password: <?php echo $Password ?>         <?php         showfooter();     } } else {     showheader("Registration Error!");     ?>     Your Two Passwords Did Not Match     <?php     showfooter(); } ?>[/code] Edit.php3 [code]<?php function showheader ($title) { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <TITLE> <?php echo $title ?> </TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <CENTER> <?php } function showfooter () { ?> </CENTER> </BODY> </HTML> <?php } mysql_connect("localhost", "root", ""); mysql_select_db("users"); if ($action == "edit_two") {     $user = mysql_query("UPDATE personalize SET Password='$Password',News1='$News1',News2='$News2',Weather='$Weather' WHERE (Name='$Name')");     setcookie("site_user", $Name, time() + 31536000, "/");     setcookie("site_pass", $Password, time() + 31536000, "/");     showheader("Edit Success!"); ?>     You Have Edited Your Profile.<BR>     User Name: <?php echo $Name ?>     <BR>     Password: <?php echo $Password ?> <?php     showfooter(); } else { $query = mysql_query("SELECT * FROM personalize WHERE(Name='$Name' AND Password='$Password')");     if (mysql_num_rows($query) != 1) {         showheader("That User/Pass Combination was Incorrect");         echo "The $Name / $Password Combination is incorrect<P>Please Try Again.";         showfooter();         exit;     }     else {         $info = mysql_fetch_array($query);         showheader("Edit ".$info['Name']."'s Profile"); ?> <FORM METHOD=POST ACTION="<?php echo $PHP_SELF ?>"> <INPUT TYPE="hidden" NAME="Name" VALUE="<?php echo $info['Name'] ?>"> <INPUT TYPE="hidden" NAME="action" VALUE="edit_two"> <TABLE> <TR>     <TD COLSPAN=2><CENTER>Please Select Your Registration Options</CENTER></TD> </TR> <TR>     <TD>Your UserName</TD>     <TD><?php echo $info['Name'] ?></TD> </TR> <TR>     <TD>Choose Your Password</TD>     <TD><INPUT TYPE="password" NAME="Password" size="10" VALUE="<?php echo $info['Password'] ?>"></TD> </TR> <TR>     <TD>News Source 1</TD>     <TD><SELECT NAME="News1">             <OPTION VALUE="32bitsonline.php3"<?php if ($info['News1'] == "32bitsonline.php3") { echo " SELECTED"; } ?>>32bitsonline</OPTION>             <OPTION VALUE="freshmeat.php3"<?php if ($info['News1'] == "freshmeat.php3") { echo " SELECTED"; } ?>>Fresh Meat</OPTION>             <OPTION VALUE="slashdot.php3"<?php if ($info['News1'] == "slashdot.php3") { echo " SELECTED"; } ?>>Slashdot</OPTION>             <OPTION VALUE="hotwired.php3"<?php if ($info['News1'] == "hotwired.php3") { echo " SELECTED"; } ?>>WebMonkey</OPTION>             </SELECT>     </TD> </TR> <TR>     <TD>News Source 2</TD>     <TD><SELECT NAME="News2">             <OPTION VALUE="32bitsonline.php3"<?php if ($info['News2'] == "32bitsonline.php3") { echo " SELECTED"; } ?>>32bitsonline</OPTION>             <OPTION VALUE="freshmeat.php3"<?php if ($info['News2'] == "freshmeat.php3") { echo " SELECTED"; } ?>>Fresh Meat</OPTION>             <OPTION VALUE="slashdot.php3"<?php if ($info['News2'] == "slashdot.php3") { echo " SELECTED"; } ?>>Slashdot</OPTION>             <OPTION VALUE="hotwired.php3"<?php if ($info['News2'] == "hotwired.php3") { echo " SELECTED"; } ?>>WebMonkey</OPTION>             </SELECT>     </TD> </TR> <TR>     <TD>Weather Source</TD>     <TD><SELECT NAME="Weather">             <OPTION VALUE="USNY0996"<?php if ($info['Weather'] == "USNY0996") { echo " SELECTED"; } ?>>New York</OPTION>             <OPTION VALUE="USCA0987"<?php if ($info['Weather'] == "USCA0987") { echo " SELECTED"; } ?>>San Francisco</OPTION>             <OPTION VALUE="CAXX0504"<?php if ($info['Weather'] == "CAXX0504") { echo " SELECTED"; } ?>>Toronto</OPTION>             </SELECT>     </TD> </TR> <TR><TD COLSPAN=2><CENTER><INPUT TYPE="submit" Value="Edit Profile!"></CENTER></TD></TR> </TABLE> </FORM> <?php     showfooter();     } } ?>[/code]
  8. [!--quoteo(post=350898:date=Mar 2 2006, 03:40 AM:name=Vini)--][div class=\'quotetop\']QUOTE(Vini @ Mar 2 2006, 03:40 AM) [snapback]350898[/snapback][/div][div class=\'quotemain\'][!--quotec--] done :) [/quote] ive enabled 'register_globals' and the script works, but i dont want to run with globals on, how would i change the script to work, with globals off?
  9. [!--quoteo(post=350688:date=Mar 1 2006, 12:17 PM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ Mar 1 2006, 12:17 PM) [snapback]350688[/snapback][/div][div class=\'quotemain\'][!--quotec--] I can't view .rar files from work and all your txt files are being parsed at serve rjust like HTML files.. :s copy all you PHP files and call them the filename.phps [/quote] done :)
  10. [!--quoteo(post=350673:date=Mar 1 2006, 11:39 AM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ Mar 1 2006, 11:39 AM) [snapback]350673[/snapback][/div][div class=\'quotemain\'][!--quotec--] just paste the scripts here then and we will have a look thru them for you mate :) [/quote] they can be grabbed all together in a rar -> [a href=\"http://www.vini.co.uk/testing/testing.rar\" target=\"_blank\"]here[/a] or viewed as textualisation files (.txt :D) -> [a href=\"http://www.vini.co.uk/testing\" target=\"_blank\"]here[/a]
  11. Hi mate, Not quite sure where i'd put 'OR die('$result'.mysql_error());' in my 3 php sctips?
  12. Im testing new codes/scripts. and ive had this problem before, but it just started working without intervention i think... but why is it that when i try and write to a DB in mysql does it never work - first time up. ive walked through [a href=\"http://www.thescripts.com/serversidescripting/php/tutorials/developaphpuserpersonalizationsystem/index.html\" target=\"_blank\"]this[/a] and tried to register, and it says: [code]You have successfully registered with: Username: Password:[/code] after username you would expect it to Echo the username ive registered, and password the same. but nothing, and it hasnt written to the DB... this has puzzled me before, but i ignored it... but its back again.. why?
×
×
  • 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.