PDA

View Full Version : duplicating buttons on list page Pekka?


malum
26th of May 2005 (Thu), 04:59
On the list page I would like the next, previous and page number info repeated at the bottom of the table of thumbnails to save having to scroll back up to go to the next page. Is there an easy way to do this?

Thanks

malum
26th of May 2005 (Thu), 06:02
I've done it but now there is a gap betwen the bottom of the table and the top of the new tab which I can't get rid of here is the code

<table border="0" cellspacing="0" cellpadding="0"><tr>

<?php print $filler_td_html; ?>
<td width="415" height="33" background="<?php print $s_graph_tab_filename; ?>">
<?php print $pageselector_html; ?>
</td>
<?php print $filler_td_html; ?>

</tr></table>





<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>

<?php print $filler_td_html; ?>
<td width="100% ">
<?php print $list_html; ?></td>
<?php print $filler_td_html; ?>

</tr></table>
<table border="0" cellpadding="0" cellspacing="0">
<tr> <?php print $filler_td_html; ?>
<td width="415" height="33" background="<?php print $s_graph_tab2_filename; ?>">
<?php print $pageselector_html; ?> </td>
<?php print $filler_td_html; ?> </tr>
</table>


see attched for gap
http://www.virtuallyinsane.com/odds/tab.jpg

help appeciated

Pekka
26th of May 2005 (Thu), 06:11
Here's one way to hack it:

in list.php replace


$pageselector_html = ob_get_contents();
ob_end_clean();


with


$pageselector_html = ob_get_contents();
ob_end_clean();


$pageselector2_html = str_replace("FORM_page_change","FORM_page_change2",$pageselector_html);
$pageselector2_html = str_replace("function_submit_page_change","function_submit_page_change2",$pageselector2_html);
$pageselector2_html = str_replace("selecter1","selecter2",$pageselector2_html);
$pageselector2_html = str_replace("select1","select2",$pageselector2_html);
$pageselector2_html = str_replace("go1","go2",$pageselector2_html);
$pageselector2_html = str_replace("&nbsp;&nbsp;<small class=\"tab\">" . $low . "-" . $high . " (" . $results_available . " " . ee_translate_B($translated["found"]) . ")</b></small><br>","",$pageselector2_html);


and now you have new template item: $pageselector2_html which you can put in list template or e.g. in outputstyles/thumbs.php.

In outputstyles/thumbs.php replace LAST


</td></tr></table>


with


<p align="right"><?php print $pageselector2_html; ?></p>
</td></tr></table>

malum
26th of May 2005 (Thu), 07:10
I'm going to pretend I understood that and go away and think about it :D

Thanks

malum
2nd of September 2005 (Fri), 04:50
I went away and thought for a very long time :D

I did it as outlined below to keep the background tab graphic as well


To repeat page selector at bottom of photo page

Make upside-down and mirrored background tab graphic and save as /styles/original/tab1c.jpg
-----------------------------------------------------------------------------------------------------

In styles/original.php add this line

$s_graph_tab2_filename = $s_graph_root . "tab1c.jpg;

At line 178 (just after the similar line for the top graphic)
-----------------------------------------------------------------------------------------------

In fetchsettings.php add

global $s_graph_tab2_filename;

at line 973 (just after similar line for top graphic)

-----------------------------------------------------------------------------------------------------

In pagetemplates/list/default.php
After line 104 add this (this adds the graphic and button to the bottom)

<table border="0" cellpadding="0" cellspacing="0">
<tr> <?php print $filler_td_html; ?>
<td width="415" height="33" background="<?php print $s_graph_tab2_filename; ?>">
<?php print $pageselector_html; ?> </td>
<?php print $filler_td_html; ?> </tr>
</table>


------------------------------------------------------------------------------------------


At bottom (line 181 ish) of outputstyles/x_per_row.php remove the <br> tag from

print "</td></tr></table><br>";

so it looks like this

print "</td></tr></table>";

In thumb.php , microthumbs.php and infocard.php

Remove <br> tag from the end of the page

This makes the graphic butt up against the bottom of the table.


This then gives a tab at the bottom of the table like so on all the list pages.
This prevents having to scroll up to the top to get to the next page

http://www.virtuallyinsane.com/odds/tab2.jpg