I am not a programmer by no means. I am trying to figure out how to get this code inserted into profile.php
$author_id = get_query_var('author');
if($author_id){
echo do_shortcode("[photosmash gallery_type='contributor' author=" . $author_id . " no_form=true]");
}
Below is profile.php code:
<?php global $mngl_user, $mngl_friend, $mngl_options; ?>
<?php $display_profile = ( $user->privacy == 'public' or
MnglUser::is_logged_in_and_an_admin() or
MnglUser::is_logged_in_and_visible() ); ?>
<table class="mngl-profile-table">
<tr>
<td valign="top" class="mngl-profile-table-col-1 mngl-valign-top">
<table>
<tr>
<td>
<?php echo $avatar; ?>
<?php echo $mngl_friends_controller->display_add_friend_button($mngl_user->id, $user->id); ?>
<?php echo do_action('mngl-profile-display',$user->id); ?>
</td>
</tr>
<tr>
<td valign="top" class="mngl-valign-top">
<?php if($display_profile) { ?>
<?php if(isset($mngl_options->field_visibilities['profile_front']['bio']) and !empty($user->bio)) { ?>
<p class="mngl-profile-bio"><?php echo MnglBoardsHelper::format_message($user->bio); ?></p>
<?php } ?>
<div class="mngl-profile-information">
<?php if(isset($mngl_options->field_visibilities['profile_front']['name']) and !empty($user->first_name) and ($user->first_name != $user->screenname)) { ?>
<p class="mngl-profile-field"><strong><?php _e('Name', 'mingle'); ?>:</strong><br/><?php echo wptexturize(stripslashes($user->first_name)); ?>
<?php if(!empty($user->last_name)){ ?>
<?php echo " " . wptexturize(stripslashes($user->last_name)); ?>
<?php } ?>
</p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['profile_front']['sex']) and !empty($user->sex)) { ?>
<p class="mngl-profile-sex"><strong><?php _e('Gender', 'mingle'); ?>:</strong><br/><?php echo $user->sex_display; ?></p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['profile_front']['location']) and !empty($user->location)) { ?>
<p class="mngl-profile-location"><strong><?php _e('Location', 'mingle'); ?>:</strong><br/><?php echo wptexturize($user->location); ?></p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['profile_front']['birthday']) and !empty($user->birthday)) { ?>
<p class="mngl-profile-location"><strong><?php _e('Birthday', 'mingle'); ?>:</strong><br/><?php echo wptexturize($user->birthday); ?></p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['profile_front']['url']) and !empty($user->url)) { ?>
<p class="mngl-profile-url"><strong><?php _e('Website', 'mingle'); ?>:</strong><br/><?php echo make_clickable($user->url); ?></p>
<?php } ?>
</div>
<?php } ?>
<p><strong><?php _e('Friends', 'mingle'); ?>:</strong><div class="mngl-profile-friend-grid-wrap"><?php echo $mngl_friends_controller->display_friends_grid($user->id); ?></div></p>
</td>
</tr>
</table>
</td>
<td valign="top" class="mngl-profile-table-col-2">
<table class="mngl-profile-body">
<tr>
<td>
<div class="mngl-profile-name"><?php echo $user->screenname; ?></div>
<?php
if(!$display_profile)
require( MNGL_VIEWS_PATH . '/mngl-boards/private.php' );
?>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<?php if($display_profile) { ?>
<td valign="top" width="100%"><div class="mngl-board"><?php echo $mngl_boards_controller->display($user->id); ?></div></td>
<?php } ?>
</tr>
</table>
</td>
</table>
The new code needs to be enclosed in <?php and ?>. Then insert it into any free HTML area, for example between the empty <td> and </td> at the bottom. If it looks better elsewhere, move it. For non-programmers this is a trial end error method. Just take care not to insert it within any <?php if(... and <?php } ?> areas.
Related
This question already has answers here:
How do I highlight table row when fetching all information with array?
(2 answers)
Closed 3 months ago.
Given the following code, I want to highlight the row of a table wherein the $listing->Full == '1'.
<table id="datatable-responsive" cellspacing="0" width="100%">
<thead>
<tr>
<th align="center">Qty</th>
<th align="center">Posted Date</th>
<th align="center">Expiration</th>
<th align="center">Full Pkg</th>
</tr>
</thead>
<tbody>
<?php foreach($listings as $listing):
?>
<tr>
<td align="center"><?php echo $listing->quantity; ?></td>
<td align="center"><?php
$pdate = new DateTime($listing->posted_at);
echo $pdate->format('m/d/y'); ?></td>
<td align="center"><?php
$date = new DateTime($listing->expdate);
echo $date->format('m/d/y');
?>
</td>
<td align="center"><?php
if($listing->full == '1'):
?>
<?php echo "Yes"; ?>
<?php else:
?>
<?php echo "No"; ?>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
So ideally, the highlight color would be FFFFE6. Any help is greatly appreciated. This is an MVC site, so changing the CSS isn't conveniently an option.
Test before you set the style. Here is an inline example:
<?php
if($listing->full == '1'):
?>
<td align="center" style="background:#FFFFE6">
<?php echo "Yes"; ?>
<?php else: ?>
<td align="center">
<?php echo "No"; ?>
<?php endif; ?>
</td>
<?php endif; ?>
Here is an example using a class in your CSS:
CSS
.highlight {
background: #FFFFE6;
}
PHP/HTML
<?php
if($listing->full == '1'):
?>
<td align="center" class="highlight">
<?php echo "Yes"; ?>
<?php else: ?>
<td align="center">
<?php echo "No"; ?>
<?php endif; ?>
</td>
<?php endif; ?>
I am trying to pull a list of registration information from MySQL. I'm changing the query over to object oriented and when I did this, the results are not being displayed inside the table. No error messages are being displayed.
<?php
$sql = "SELECT * FROM `prereg`";
if (!$stmt = $mysqli->query("SELECT * FROM prereg")) {
echo "Query Failed!: (" . $mysqli->errno . ") ". $mysqli->error;
}else{
while ($row = mysqli_fetch_assoc()) {
?>
<tr>
<!-- <td>
<?php echo $row['UID']; ?>
</td> -->
<td>
<?php echo $row['Guradian']; ?>
</td>
<td>
<?php echo $row['Number']; ?>
</td>
<td>
<?php echo $row['Phone']; ?>
</td>
<td>
<?php echo $row['Name']; ?>
</td>
<!-- <td>
<?php echo $row['Address']; ?>
</td> -->
<td>
<?php echo $row['City']; ?>
</td>
<td>
<?php echo $row['State']; ?>
</td>
<!-- <td>
<?php echo $row['Zip']; ?>
</td>
<td>
<?php print $row['Make']; ?>
</td>
<td>
<?php print $row['Ms']; ?>
</td> -->
<td>
<?php print $row['Fuel']; ?>
</td>
<td>
<?php echo $row['Class1']; ?>
</td>
<td>
<?php print $row['Class2']; ?>
</td>
<td>
<?php print $row['Class3']; ?>
</td>
</tr>
<?php } }
$stmt->free(); ?>
What am I doing wrong? I've searched and searched and I cannot find anything that fixes the problem.
REVISED:
<?php
$stmt = $mysqli->query("SELECT * FROM prereg");
if($stmt->num_rows > 0):
while ($row = $stmt->fetch_assoc()):
?>
<tr>
<!-- <td>
<?php echo $row['UID']; ?>
</td> -->
<td>
<?php echo $row['Guradian']; ?>
</td>
<td>
<?php echo $row['Number']; ?>
</td>
<td>
<?php echo $row['Phone']; ?>
</td>
<td>
<?php echo $row['Name']; ?>
</td>
<!-- <td>
<?php echo $row['Address']; ?>
</td> -->
<td>
<?php echo $row['City']; ?>
</td>
<td>
<?php echo $row['State']; ?>
</td>
<!-- <td>
<?php echo $row['Zip']; ?>
</td>
<td>
<?php print $row['Make']; ?>
</td>
<td>
<?php print $row['Ms']; ?>
</td> -->
<td>
<?php print $row['Fuel']; ?>
</td>
<td>
<?php echo $row['Class1']; ?>
</td>
<td>
<?php print $row['Class2']; ?>
</td>
<td>
<?php print $row['Class3']; ?>
</td>
</tr>
<?php endwhile; endif; ?>
</table>
<?php
$stmt = $mysqli->query("SELECT * FROM prereg");
if($stmt->num_rows > 0): ?>
<table>
<?php while($row = $stmt->fetch_assoc()): ?>
<tr>
<?php foreach($row as $val): ?>
<td><?php echo $val; ?></td>
<?php endforeach; ?>
</tr>
<?php endwhile; ?>
</table>
<?php endif; ?>
</center>
when trying to retrofit the code you have provided with the table I already had, the code you gave works, the table I have still wont populate.
If you are using the procedural interface mysqli_fetch_assoc(), you need to provide the mysqli_result.
while ($row = mysqli_fetch_assoc($stmt)) {
If you'd use the object oriented interface, then just use it as its method:
while($row = $stmt->fetch_assoc()) {
Revised:
<?php
$mysqli = new mysqli('localhost', 'username', 'password', 'database_name');
$stmt = $mysqli->query('SELECT * FROM prereg');
?>
<?php if($stmt->num_rows > 0): ?>
<table>
<?php while($row = $stmt->fetch_assoc()): ?>
<tr>
<?php foreach($row as $val): ?>
<td><?php echo $val; ?></td>
<?php endforeach; ?>
</tr>
<?php endwhile; ?>
</table>
<?php else :?>
<p>Table empty</p>
<?php endif; ?>
I am working in an existing theme from my company. They have a special page template. This template uses custom fields you can fill in, they then get displayed on the page.
The general text field that you see when editing a page is not shown on the page however. (it is in the dashboard environment.) This is what the page template looks like:
<?php get_header() ?>
<?php the_post() ?>
<!-- start content -->
<div id="content">
<div class="col left">
<?php dynamic_sidebar( 'left-widgets' ); ?>
</div>
<h1 class="mobiletitle" style="text-align:center;"><?php the_title() ?> </h1>
<div id="center">
<div class="two-col">
<?php
if( get_field('slider') )
{ ?>
<div class="rslides_container">
<ul class="rslides" id="slider1">
<?php while( has_sub_field("slider") )
{
$variable = get_sub_field('image'); ?>
<li><img src="<?php echo $variable;?>" alt="Magic Stables"></li>
<?php } ?>
</ul>
</div>
<?php } ?>
<h1 class="maintitle" style="text-align:center;"><?php the_title() ?> </h1>
<div class="horseinfo">
<table>
<?php if(get_field('naam_paard')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Naam:
<?php } else { ?>
Name:
<?php } ?></td>
<td><?php the_field('naam_paard'); ?></td>
</tr>
<?php } ?>
<?php if(get_field('afstamming')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Afstamming:
<?php } else { ?>
Breed:
<?php } ?></td>
<td><?php the_field('afstamming'); ?></td>
</tr>
<?php } ?>
<?php if(get_field('geslacht')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Geslacht:
<?php } else { ?>
Gender:
<?php } ?></td>
<td><?php the_field('geslacht'); ?></td>
</tr>
<?php } ?>
<?php if(get_field('geboortejaar')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Geboortejaar:
<?php } else { ?>
Year of Birth:
<?php } ?></td>
<td><?php the_field('geboortejaar'); ?></td>
</tr>
<?php } ?>
<?php if(get_field('geboortejaarkleur')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Geboortejaarkleur:
<?php } else { ?>
Birth color:
<?php } ?></td>
<td><?php the_field('geboortejaarkleur'); ?></td>
</tr>
<?php } ?>
<?php if(get_field('stokmaat')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Stokmaat:
<?php } else { ?>
Height:
<?php } ?></td>
<td><?php the_field('stokmaat'); ?></td>
</tr>
<?php } ?>
<?php if(get_field('fokker_naam')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Fokker:
<?php } else { ?>
Breeder:
<?php } ?></td>
<td><?php the_field('fokker_naam'); ?></td>
</tr>
<?php } ?>
<?php if(get_field('fokker_plaats')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Fokker plaats:
<?php } else { ?>
Breeding place:
<?php } ?></td>
<td><?php the_field('fokker_plaats'); ?></td>
</tr>
<?php } ?>
<?php if(get_field('overig')) { ?>
<tr>
<td><?php if(ICL_LANGUAGE_CODE=='nl') { ?>
Overig:
<?php } else { ?>
Other:
<?php } ?></td>
<td><?php the_field('overig'); ?></td>
</tr>
<?php } ?>
</table>
</div>
<br><br>
<?php if(the_content()) { ?>
<div class="one-col">
<?php the_content() ?>
</div>
<?php } ?>
<?php if(get_field('linkerkolom')) { ?>
<div class="two-col-1">
<?php the_field('linkerkolom'); ?>
</div>
<div class="two-col-2">
<?php the_field('rechterkolom'); ?>
</div>
<?php } ?>
</div>
</div>
<div class="col right">
<?php dynamic_sidebar( 'right-widgets' ); ?>
</div>
<?php get_footer() ?>
I see that with this line you make the text from a custom form appear:
<?php the_field('fokker_naam'); ?>
Now, how do I get the normal field to appear on the page again? What is the name of this field?
I need to use this field because I would like to use the editor, to create font styles and such.
The main post content is accessed via the_content() function:
<?php the_content(); ?>
I'm editing the template file for the customer dashboard at sales/order/recent.phtml. I want the tracking number along with a tracking link to show up under the recent order. I have tried the following but getAllTracks is not grabbing anything. Thoughts?
<?php foreach ($_orders as $_order): ?>
<tr>
<td><?php echo $_order->getRealOrderId() ?></td>
<td><span class="nobr"><?php echo $this->formatDate($_order->getCreatedAtStoreDate()) ?></span></td>
<td><?php echo $_order->getShippingAddress() ? $this->htmlEscape($_order->getShippingAddress()->getName()) : ' ' ?></td>
<td><?php echo $_order->formatPrice($_order->getGrandTotal()) ?></td>
<td><em><?php echo $_order->getStatusLabel() ?></em></td>
<td class="a-center">
<span class="nobr">
<?php echo $this->__('View Order') ?>
<?php if ($this->helper('sales/reorder')->canReorder($_order)) : ?>
<span class="separator">|</span> <?php echo $this->__('Reorder') ?>
<?php endif ?>
</span>
</td>
</tr>
<tr>
<?php $collection = Mage::getResourceModel('sales/order_shipment_collection');
$collection->addAttributeToFilter('order_id', $_order->getRealOrderId()); ?>
<?php foreach($collection as $_ship): ?>
<?php var_dump($_ship->getAllTracks())?>
<?php $i=0; foreach ($_ship->getAllTracks() as $_item): $i++ ?>
<?php $url = $this->helper('shipping')->getTrackingPopupUrlBySalesModel($_order) ?>
<?php echo "URL is". $url ?>
<?php if ($url): ?>
<td align="center" valign="top" style="padding:3px 9px"><?php echo $_item->getNumber() ?></td>
<?php else: ?>
<td align="center" valign="top" style="padding:3px 9px"><?php echo $_item->getNumber() ?></td>
<?php endif; ?>
<?php endforeach ?>
<!---Track --->
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
Ended up being a really short line of code to put the link in there. I didn't bother to keep working at getting the tracking number. I put the link in the second to last column.
<div class="box-account box-recent">
<?php $_orders = $this->getOrders(); ?>
<div class="box-head">
<h2><?php echo $this->__('Recent Orders') ?></h2>
<?php if( sizeof($_orders->getItems()) > 0 ): ?><?php echo $this->__('View All') ?><?php endif; ?>
</div>
<?php if( sizeof($_orders->getItems()) > 0 ): ?>
<table class="data-table" id="my-orders-table">
<col width="1" />
<col width="1" />
<col />
<col width="1" />
<col width="1" />
<col width="1" />
<thead>
<tr>
<th><?php echo $this->__('Order #') ?></th>
<th><?php echo $this->__('Date') ?></th>
<th><?php echo $this->__('Ship To') ?></th>
<th><span class="nobr"><?php echo $this->__('Order Total') ?></span></th>
<th><?php echo $this->__('Status') ?></th>
<th><?php echo $this->__('Track') ?></th>
<th> </th>
</tr>
</thead>
<tbody>
<?php foreach ($_orders as $_order): ?>
<tr>
<td><?php echo $_order->getRealOrderId() ?></td>
<td><span class="nobr"><?php echo $this->formatDate($_order->getCreatedAtStoreDate()) ?></span></td>
<td><?php echo $_order->getShippingAddress() ? $this->htmlEscape($_order->getShippingAddress()->getName()) : ' ' ?></td>
<td><?php echo $_order->formatPrice($_order->getGrandTotal()) ?></td>
<td><em><?php echo $_order->getStatusLabel() ?></em></td>
<td>
<?php if ($_order->getTracksCollection()->count()) : ?>
<?php echo $this->__('Track Order Shipment') ?>
<br/>
<?php endif; ?>
</td>
<td class="a-center">
<span class="nobr">
<?php echo $this->__('View Order') ?>
<?php if ($this->helper('sales/reorder')->canReorder($_order)) : ?>
<span class="separator">|</span> <?php echo $this->__('Reorder') ?>
<?php endif ?>
</span>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<script type="text/javascript">decorateTable('my-orders-table')</script>
<?php else: ?>
<p><?php echo $this->__('You have placed no orders.'); ?></p>
<?php endif; ?>
</div>
is this a good way of doing it? or should i use a date time stamp with seconds rather?
while i am on a page, the new message must come through without me refreshing the page
my code is written in php:
<div id='div_longgray_gradient2'>
<div id='div_float_img'>
<table width='96%' border='0'>
<tr>
<td rowspan='2' width='40px' align='left'>
<img src='/images/rainbow/arrow.png'>
</td>
<td align='left'>
<span class='spn_big_black_rbc'>MESSAGES</span>
</td>
</tr>
<tr>
<td align='left'>
<span class='spn_med_lightblue_rbc'>Inbox</span>
</td>
<td align='left'>
</td>
</tr>
</table>
<br/>
<br/>
<table width='80%' align='center'>
<tr>
<td class='td_show_contact_heading' align='left'><span class='spn_med_lightblue_rbc'>Received</span></td>
<td class='td_show_contact_heading' align='left'><span class='spn_med_lightblue_rbc'>Message</span></td>
<td class='td_show_contact_heading' align='left'><span class='spn_med_lightblue_rbc'>From</span></td>
</tr>
<?php
$cursor = $pager->getFirstIndice();
foreach ($pager->getResults() as $msg)
{
$has_freechat = false;
//changed id to withid here
$freechat_req_link="profiles/confirmfreechat?withid=".$msg->getRcProfileTableRelatedByProfileIdFrom()->getId();
$freechat_req_link=link_to('Freechat',$freechat_req_link,'class=link_small_dark');
$cc = sizeof ($fc_records);
for($i = 0; $i < $cc; $i++)
{
if($fc_records[$i]->getProfileIdWith() == $msg->getProfileIdFrom())
{
$has_freechat = true;
break;
}
}
$unique_code_from = $msg->getRcProfileTableRelatedByProfileIdFrom()->getUniqueCode();
$block_url = link_to('Block User',"blocklist/block?unqiue_code=$unique_code_from",'class=link_medium_blue');
echo "<tr>";
$date = add_date($msg->getCreatedAt(),$hr=2);
echo "<td class='td_show_contact_item' align='left'>".$date."</td>";
$opened_once = $msg->getOpenedOnce();
if($opened_once >= 1)
{
echo "<td class='td_show_contact_item' align='left'>".link_to($msg->getSubject(), 'messagebox/read?cursor='.$cursor,'class=link_medium_blue')."</td>";
}
else
{ ?>
<td align='left'>
<a href="<?php echo url_for('messagebox/read?cursor=').$cursor ?>" style='color:#ff0000 !important' class='spn_small_red_rbc'><?php echo $msg->getSubject();?></a>
</td>
<?php
}
echo "<td class='td_show_contact_item' align='left'>".$unique_code_from." ( $block_url )</td>";
echo "</tr>";
++$cursor;
}
function add_date($givendate,$hr=2)
{
$cd = strtotime($givendate);
$newdate = date('Y-m-d H:i:s', mktime(date('h',$cd)+$hr, date('i',$cd), date('s',$cd), date('m',$cd), date('d',$cd), date('Y',$cd)));
return $newdate;
}
?>
</table>
<br/>
Displaying results <?php echo $pager->getFirstIndice() ?> to <?php echo $pager->getLastIndice() ?>.
<br/>
<?php if ($pager->haveToPaginate()): ?>
<?php echo link_to('«', 'messagebox/list?page='.$pager->getFirstPage()) ?>
<?php echo link_to('<', 'messagebox/list?page='.$pager->getPreviousPage()) ?>
<?php $links = $pager->getLinks(); foreach ($links as $page): ?>
<?php echo ($page == $pager->getPage()) ? $page : link_to($page, 'messagebox/list?page='.$page) ?>
<?php if ($page != $pager->getCurrentMaxLink()): ?> - <?php endif ?>
<?php endforeach ?>
<?php echo link_to('>', 'messagebox/list?page='.$pager->getNextPage()) ?>
<?php echo link_to('»', 'messagebox/list?page='.$pager->getLastPage()) ?>
<?php endif ?>
<table width='96%' border='0'>
<tr>
<td rowspan='2' width='40px' align='left'>
<img src='/images/rainbow/arrow.png'>
</td>
<td align='left'>
<span class='spn_big_black_rbc'></span>
</td>
</tr>
<tr>
<td align='left'>
<span class='spn_med_lightblue_rbc'>Sent Items</span>
</td>
</tr>
</table>
<br/>
<br/>
<table width='80%' align='center'>
<tr>
<td class='td_show_contact_heading' align='left'><span class='spn_med_lightblue_rbc'>Sent</span></td>
<td class='td_show_contact_heading' align='left'><span class='spn_med_lightblue_rbc'>Message</span></td>
<td class='td_show_contact_heading' align='left'><span class='spn_med_lightblue_rbc'>To</span></td>
</tr>
<?php
$cursor2 = $pager2->getFirstIndice();
$br = sizeof ($block_records);
foreach ($pager2->getResults() as $item)
{
$link = link_to('Delete',"messagebox/deleteSentmsg?mid=".$item->getId(),'class=link_medium_blue');
$id = $item->getRcProfileTableRelatedByProfileIdTo()->getId();
?>
<tr>
<td class='td_show_contact_item' width='15%' align='left'><?php echo $date = add_date($item->getCreatedAt(),$hr=2); ?></td>
<td class='td_show_contact_item' width='45%' align='left'><?php echo $item->getMessage()?></td>
<td class='td_show_contact_item' width='25%' align='left'><?php echo $item->getRcProfileTableRelatedByProfileIdTo()->getUniqueCode()." ".$link;?></td>
</tr>
<?php
++$cursor2;
}
?>
</table>
<br/>
Displaying results <?php echo $pager2->getFirstIndice(); ?> to <?php echo $pager2->getLastIndice(); ?>.
<br/>
<?php if ($pager2->haveToPaginate()): ?>
<?php echo link_to('«', 'messagebox/list?page2='.$pager2->getFirstPage(),'class=link_big_dark') ?>
<?php echo link_to('<', 'messagebox/list?page2='.$pager2->getPreviousPage(),'class=link_big_dark') ?>
<?php $links = $pager2->getLinks(); foreach ($links as $page2): ?>
<?php echo ($page2 == $pager2->getPage()) ? $page2 : link_to($page2, 'messagebox/list?page2='.$page2,'class=link_big_dark') ?>
<?php if ($page2 != $pager2->getCurrentMaxLink()): ?> - <?php endif ?>
<?php endforeach ?>
<?php echo link_to('>', 'messagebox/list?page2='.$pager2->getNextPage(),'class=link_big_dark') ?>
<?php echo link_to('»', 'messagebox/list?page2='.$pager2->getLastPage(),'class=link_big_dark') ?>
<?php endif ?>
</div>
</div>
can anyone give some advise please?
i have no ajax/JS here so dont know how i would incorporate it
PHP is a server side language and will not update a page once it has been fetched by the browser. To do this you will need to use a combination of server side and client side scripts.
One way of making your page update it's content is to use AJAX (http://api.jquery.com/jQuery.ajax/) combined with a timer (setInterval() and setTimeout()) to query a PHP script and check for updates every x seconds. The updates can then be added to the page when they are available using JavaScript / jQuery.