Project Detail

PHP mood modification  

PHP mood modification is project number 283368
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: dboyzhang

Budget: $30-250

Created: 07/06/2008 at 1:58 EDT

Bid Count: 6

Average Bid:
N/A

07/12/2008 at 1:58 EDT

Project Creator: irishrage
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (5 reviews)

Bid On This Project
 

Description

Im using a free article script. I need this mood below to link to each article. I want you to install the script at your own server to make neccesary changes in this mod. If you are able to pull this off then Ive have other mood that need modifications...


"Ok here is a very messy and basic one. Still got some formatting to do to it to stop it stretching the comment. If you know css then just add in a wordwrap in there. Also need to make it link to the current comment but ill add that later, one of you should be able to work out how to do it.

To see an example of it go to x and check the bottom block on the right column.

Create a latest comments block.

HTML

Code:
<h2>Latest Comments</h2>
{section name=$this->i loop=$this->comment}
{$this->comment[$this->i]['comment_text']}<br>
<b>Written By: {$this->comment2[$this->i]['user_name']}</b><hr>
{/section}


PHP

Code:
$q = $this->db->query("SELECT * FROM {$this->pre}comments ORDER BY comment_id DESC LIMIT 5");

$this->comment = array();
while ($row = $this->db->nqfetch($q)){
$this->comment[] = $row;
$text = $row['comment_text'];
$user = $row['comment_author'];

$q2 = $this->db->query("SELECT * FROM {$this->pre}users WHERE user_id=$user");

while ($row2 = $this->db->nqfetch($q2)){
$this->comment2[] = $row2;
$user2 = $row2['user_name'];
}

if (strlen($text) > 50){
$this->comment[sizeof($this->comment)-1]['comment_text'] = substr($text,0,50).' <b>...</b>';
}
}

Like i said, its messy so there might be useless things in there which arent needed. If you want to change the length of how much of the comment is shown then go down to where it says strlen($text) and change 50 to whatever you want it to be, also on the next line change 50 to the same number.

If no one makes the comments link to each article then ill do it eventually. Just in a bit of a rush atm. Ill add a full tutorial on how to do this on my website later. "

Messages Posted:0 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

Bids are hidden by the project creator. Log in as the project creator or as one of the bidders to view bids. You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


    Bid on this Project