Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 04-15-2006 09:25:29

Toughskins
Member
Registered: 04-15-2006
Posts: 2

Changing Next/previous Page Icon

I am wanting to add images to the NEXT/PREVIOUS PAGE string to make it more noticeable does anyone know if this is possible??

Offline

 

#2 04-16-2006 09:32:02

grapefix
Member
Registered: 12-01-2004
Posts: 73
Website

Re: Changing Next/previous Page Icon

I did this on one of my shopping cart projects - wwwadvancedhouseplans.com

Talked some about it in this topic:

I modified the ste_prod.pl, and these elements: ste_listpvnx.txt, and ste_listpvnxft.txt

You can grab the images used at this path:

(use the image names found in the following code)

The ste_listpvnx.txt now reads:

Code:

<LEFT>
<table border="0" cellpadding="0" cellspacing="0"
background="(CGIVAR)images_path(/CGIVAR)/button/nav-numbersbg2.gif"><tr><td>


<table border="0" cellpadding="0" cellspacing="0" width="185" height="22" align="left"
background="(CGIVAR)images_path(/CGIVAR)/button/nav-numbersbg2.gif"><tr>
<td align="center"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)"
COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">Showing <B>(CGIVAR)first_row(/CGIVAR)
 to (CGIVAR)last_row(/CGIVAR) of 
(CGIVAR)rows_count(/CGIVAR)</B></td></tr></table>

The ste_listpvnxft.txt now reads:

Code:

</FONT>
</td></tr></table><BR>

And the ste_prod.pl was changed as follows:

Find the code that starts with:

Code:

&display_print('ste_listpvnx');

and ends with:

Code:

&display_print('ste_listpvnxft');

Replace this entire code with this:

Code:

&display_print('ste_listpvnx');

my $prev_startrow = ($fd_startrow - $store_products_to_display_per_page);
my $next_startrow = ($fd_startrow + $store_products_to_display_per_page);

$catstring = $q->param('catstr');

$catstring_encoded = vars_urlencode($catstring);
$catstring_encoded =~ s/\%3A/\:/gs;

if ($fd_startrow ne "0") {

print <<ENDOFTEXT;
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"273\">
                            <tr>
                              <td width=\"143\" height=\"22\" background=\"$images_path/button/nav-back-bg2.gif" align=\"center\" valign=\"middle\"><A HREF=\"$common_url&pg=$fd_pg&startrow=$prev_startrow&searchstr=$fd_searchstr_encoded&searchrpp=$store_products_to_display_per_page&searchtyp=$fd_searchtyp_encoded&ref=$fd_ref_encoded&cat=$fd_cat_encoded&catstr=$catstring_encoded\">$html_previous_string</A>   </td>
ENDOFTEXT

} else {

print <<ENDOFTEXT;
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"273\">
                            <tr>
                              <td width=\"143\" height=\"22\" background=\"$images_path/button/nav-back-bgnone2.gif" align=\"center\" valign=\"middle\"> </td>
ENDOFTEXT

} ######### End of if statement.

if ($fd_startrow < "$rows_count" && $next_startrow < "$rows_count") {

print <<ENDOFTEXT;
<td width=\"130\" height=\"22\" background=\"$images_path/button/nav-next-bg2.gif" align=\"center\" valign=\"middle\">   <A HREF=\"$common_url&pg=$fd_pg&startrow=$next_startrow&searchstr=$fd_searchstr_encoded&searchrpp=$store_products_to_display_per_page&searchtyp=$fd_searchtyp_encoded&ref=$fd_ref_encoded&cat=$fd_cat_encoded&catstr=$catstring_encoded\">$html_next_string</A></td></tr></table>
ENDOFTEXT

} else {

print <<ENDOFTEXT;
<td width=\"130\" height=\"22\" background=\"$images_path/button/nav-next-bgnone2.gif" align=\"center\" valign=\"middle\"> </td></tr></table>
ENDOFTEXT

} ######### End of if statement.

&display_print('ste_listpvnxft');

This should give you the result seen on advancedhouseplans.com (category 1-story plans). It also changes appropriately when there's no previous page or no next page.

NOTE: I was unable to get actual buttons to work - I had to use the previous and next strings from the global settings. So this is the solution I came up with.

It's fairly specific to my site, with table sizes and colors as I needed them. But the images are all 'background' images in the table and should resize as your table shrinks or grows in your coding.

Hopefully this helps or at least shows you how to work through one solution.

Reply if you need help and I'll try my best.

grapefix

Offline

 

#3 05-12-2006 15:08:08

ellehazen
Member
Registered: 03-14-2006
Posts: 129

Re: Changing Next/previous Page Icon

It doesnt seem like there are enough image names here... can you list the image names for me?

Also, I noticed that on your site the nav arrows are at the top AND the bottom of the viewable items/products.  What would I change in this code to just leave it at the bottom, as I dont believe this would integrate well into my particular layout...

Thanks for your help!

Offline

 

#4 05-12-2006 18:35:16

grapefix
Member
Registered: 12-01-2004
Posts: 73
Website

Re: Changing Next/previous Page Icon

nav-back-bg2.gif
nav-back-bgnone2.gif
nav-next-bg2.gif
nav-next-bgnone2.gif
nav-numbersbg2.gif

That's really it. The nav-numbersbg2.gif is used as a background in the TABLE tag, so it will span whatever size your table is. And the other images come up for individual cell backgrounds.

It's really confusing, I know. That's why I gave the whole code. Also, this only works right if you keep the table and cell heights as I have them and don't change the heights of the images. Of course, you could rename them if that helps keep them straight. Color them different or just use them as a template.

The '2' is only because I didn't like my first version of these graphics, so I made another.

I made the navigation at both top and bottom work after everything else. If you just modify your existing code like I show, it won't appear in both places.

The only real modification to the ste_prod.pl is the table layout coding - just worry about those lines that define the tables and their sizes, etc. and you'll be fine. Also, I recommend that you work around anything that starts with a $ - just paste above and below that stuff with what I have.

And always make a backup of the file, too!

Let me know how it goes, so I can see the results.

Allen

Offline

 

#5 10-27-2006 07:10:14

violinman
Member
Registered: 09-17-2005
Posts: 53

Re: Changing Next/previous Page Icon

Hi Grapefix,
Could you possibly make the forward back buttons available to me, I tried the link in your post but to no avail.

Regards, Brian

Offline

 

Board footer