wish to edit the style of this but its in php

Discussion in 'Programming' started by nicky s, Apr 14, 2010.

  1. #1
    hey DP

    just downloaded Scriptsmill Comments Script and installed it now i want to change the stle of it, me being dumb i thought it was going to be in css but no its in php this is what i have

    <?
    
    // Please don't modify or delete the copyright notice. Doing that is a violation of GPL.
    
    print<<<EOF
    <style type="text/css">
    div#usernotes {
    	background-color: transparent;
    }
    div#usernotes div.head, div#usernotes div.foot {
    	background-color: transparent;
    	padding: 4px;
    }
    div#usernotes div.foot {
    	text-align: right;
    }
    div#usernotes div.foot a, div#usernotes div.head a {
    	background-color: transparent;
    }
    div#usernotes span.action {
    	float: right;
    }
    div#usernotes div.note {
    	margin-left: 2em; 
    	margin-right: 2em; 
    	border-bottom:1px dashed;
    	padding: 4px;
    }
    div#usernotes div.text {
    	padding: 2px;
    	margin-top: 4px;
    }
    </style>
    
    <div id="usernotes">
     <div class="head">
     <H3>{$COM_LANG['header']}</H3>
     </div>
    EOF;
    
     if ($comments_count) {
      for($i=0; $i<$comments_count; $i++) {
       if ($dont_show_email[$i] != '1' && $email != '') { $author[$i] = "<a href=\"mailto:{$email[$i]}\">{$author[$i]}</a>"; }
       $text[$i] = str_replace(chr(13), '<br />', $text[$i]);
       
       print<<<EOF
     <div class="note">
      <strong>{$author[$i]}</strong><br />
      <small>{$time[$i]}</small>
      <div class="text">
      {$text[$i]}
      </div>
     </div>
    EOF;
      
      }
     }
     else {
       print<<<EOF
     <div class="note">
      <div class="text">
      {$COM_LANG['no_comments_yet']}
      </div>
     </div>
    EOF;
     }
     
    print<<<EOF
     <div class="foot">
    		<form method=POST action='{$COM_CONF['script_url']}'>
    	              <input type=hidden name="action" value="add">
    		      <input type=hidden name="href" value="{$_SERVER['REQUEST_URI']}">
    		  <table width="290" border="0" cellspacing="1" cellpadding="2" align="center">
    		    <tr> 
    		      <td width="83" align="right"><font color="red">*</font>{$COM_LANG['Name']}: 
    		        </td>
    		      <td width="196" align="left">
    		        <input type=text name="disc_name" maxlength=40 size=30>
    		        <input type=hidden name="r_disc_name" value="{$COM_LANG['r_disc_name']}">
    		        </td>
    		    </tr>
    		    <tr> 
    		      <td width="83" align="right">{$COM_LANG['E-mail']}:</font></td>
    		      <td width="196" align="left">
    		        <input type="Text" name="disc_email" size="30" maxlength="70">
    		        </td>
    		    </tr>
    		    <tr> 
    		      <td width="83"></td>
    		      <td width="196" align="left">
    			<input type="checkbox" name="email_me"><font size=2><nobr>{$COM_LANG['Notify']}</nobr></font><br>
    			<input type="checkbox" name="dont_show_email" CHECKED><font size=2><nobr>{$COM_LANG['Dont_show_email']}</nobr></font><br>
    		        </td>
    		    </tr>
    		    <tr> 
    		      <td valign="top" width="83" align="right"> 
    		        <font color="red">*</font>{$COM_LANG['Text']}:
    		      </td>
    		      <td valign="top" width="196" align="left">
    		        <textarea name="disc_body" cols="40" rows="13" wrap="VIRTUAL"></textarea>
    		        <input type=hidden name="r_disc_body" value="{$COM_LANG['r_disc_text']}">
    		        </td>
    		    </tr>
    		    <tr> 
    		      <td valign="top" width="83" align="right">&nbsp; </td>
    		      <td valign="top" width="196">
    		        <div align="center">
    		          <input type="submit" name="Submit" value="{$COM_LANG['Submit']}">
    		          </div>
    		      </td>
    		    </tr>
    		  </table>
    		</form>
    		<!-- ScritsMill Comments Copyright Notice -->
              Powered by  <a href="http://www.scriptsmill.com/comments.html">Scriptsmill Comments Script</a>
    		<!-- /ScritsMill Comments Copyright Notice -->
     </div>
    </div>
    EOF;
    
    ?>
    Code (markup):
    this is what it looks like http://streamingtwoandahalfmen.com/s1e1.php

    i want it to fit in with my site and mabey even have the comments in boxes instead of just a dotted line.

    can any one help ?
     
    nicky s, Apr 14, 2010 IP
  2. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Though the file is in php, you can see the CSS and HTML codes quite clearly. Just edit the CSS as you want, save and upload to server.
     
    NeoCambell, Apr 14, 2010 IP
  3. nicky s

    nicky s Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i can see that but im not amazing and code

    is there anyway i can take the css out of the php and into a diffrent file so it is easyer to work with ? or will this not work
     
    Last edited: Apr 14, 2010
    nicky s, Apr 14, 2010 IP
  4. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #4
    1. Cut the following part of code.
    2. Create a new css file, name it phpformstyle.css, and paste the code.
    
    <style type="text/css">
    div#usernotes {
    	background-color: transparent;
    }
    div#usernotes div.head, div#usernotes div.foot {
    	background-color: transparent;
    	padding: 4px;
    }
    div#usernotes div.foot {
    	text-align: right;
    }
    div#usernotes div.foot a, div#usernotes div.head a {
    	background-color: transparent;
    }
    div#usernotes span.action {
    	float: right;
    }
    div#usernotes div.note {
    	margin-left: 2em; 
    	margin-right: 2em; 
    	border-bottom:1px dashed;
    	padding: 4px;
    }
    div#usernotes div.text {
    	padding: 2px;
    	margin-top: 4px;
    }
    </style>
    
    Code (markup):
    3. Modify your php form code to look like:
    (change the "path/to" with your actual path)
    
    <?
    
    // Please don't modify or delete the copyright notice. Doing that is a violation of GPL.
    
    print<<<EOF
    <link rel="stylesheet" type="text/css" href="path/to/phpformstyle.css" />
    
    <div id="usernotes">
     <div class="head">
     <H3>{$COM_LANG['header']}</H3>
     </div>
    EOF;
    
    Code (markup):
    Good luck.
     
    nimonogi, Apr 14, 2010 IP