Forums / All Other Contributions/Addons / Image Titles Support Thread

Image Titles Support Thread

Views: 28,613

Results 81 to 100 of 156
4 Feb 2010, 1:12 AM
#81
integrity_designs avatar

integrity_designs

Zen Follower

Join Date:
Nov 2009
Location:
North Bendigo, VIC, Australia
Posts:
157
Plugin Contributions:
0

Image Titles Support Thread

Thank-you.
That helped solve that issue.
Kind Regards

22 Jul 2010, 3:53 AM
#82
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Image Titles Support Thread

Hi,

I want to use a transparent .png file instead of a .gif file, as well ... the gif file looks like crap lol

Can I just go in and change all the instances of .gif to .png in your files?

Thanks!
Joanne

22 Jul 2010, 12:59 PM
#83
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Titles Support Thread

That should work fine. Let me know how you make out. As I update my mods, I am moving to settable image extensions so the filetype only needs to be defined once, or where practical, can be set at runtime.

23 Jul 2010, 2:01 AM
#84
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Image Titles Support Thread

Yep, it worked :D

You can check out my store here http://www.joannes-digital-designs.com

Thanks,

Joanne

23 Jul 2010, 2:32 AM
#85
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: Image Titles Support Thread

LOL, I'm sorry, I was supposed to have posted this in the Image Handler thread, so sorry!!

13 Aug 2010, 10:15 AM
#86
so19firearms avatar

so19firearms

New Zenner

Join Date:
Nov 2009
Posts:
6
Plugin Contributions:
0

Re: Image Titles Support Thread

Can this add-on be used to change the title text of the categories on the main pages?
(Similar to the product titles - but for the categories preceding these)

17 Aug 2010, 1:10 PM
#87
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Titles Support Thread

Not currently, but it should be fairly easy to add the functionality to the category/subcategory listing page using the same kind of code as the product info page uses.

18 Sep 2010, 1:46 PM
#88
tx_rustler avatar

tx_rustler

New Zenner

Join Date:
Feb 2010
Location:
Texas - The Republic
Posts:
27
Plugin Contributions:
0

Re: Image Titles Support Thread

I downloaded the ...2_0beta.zip file you attached in the other thread.

Uploaded it to my site per your 2.0 read me.

I get a ```
Parse error: syntax error, unexpected ';', expecting ')' in ...... /includes/modules/classic/category_row.php on line 42


When I brought up the file, line 42 looks like ```
$list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
                                           'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . (title_image_exists($categories->fields['categories_name'], 'categoryname' . $categories->fields['categories_id']) . '</a>');

I count 4 opening parens, and only 3 closing parens.

I am not enough of a programmer to know where to put the 4th closing parens.

Or am I counting it wrong?

Suggestions?
Jim

18 Sep 2010, 10:52 PM
#89
tx_rustler avatar

tx_rustler

New Zenner

Join Date:
Feb 2010
Location:
Texas - The Republic
Posts:
27
Plugin Contributions:
0

Re: Image Titles Support Thread

Can't find the edit button, maybe too much time has elapsed?

Any way, I got it fixed, the last line that ends

'<a>');

should be changed to

'<a>'));

Great MOD, thanks for your work.

Jim

18 Sep 2010, 10:53 PM
#90
tx_rustler avatar

tx_rustler

New Zenner

Join Date:
Feb 2010
Location:
Texas - The Republic
Posts:
27
Plugin Contributions:
0

Re: Image Titles Support Thread

Can't find the edit button, maybe too much time has elapsed?

Any way, I got it fixed, the last line that ends

'<a>');

should be changed to

'<a>'));

Great MOD, thanks for your work.

Jim

19 Sep 2010, 4:01 AM
#91
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Titles Support Thread

Thanks for that bugfix. I have updated the zip and will post it here for a bit more testing. When I am sure it is all good, I will update the mod, and delete this when it is available in Free Addons.

19 Sep 2010, 10:41 PM
#92
tx_rustler avatar

tx_rustler

New Zenner

Join Date:
Feb 2010
Location:
Texas - The Republic
Posts:
27
Plugin Contributions:
0

Re: Image Titles Support Thread

I forgot to mention, I was so pleased to get it working, what may be another problem.

I have the boxes featured products, specials, etc turned off.

When I uploaded all files, even after it was working I got an error referring to left and right .php and special/featured.php, I just deleted them from my file structure as the help file said I could and all was well.

But you might want to check it and maybe have the file check to see if that box is turned on or not, or state in the help file not to upload those files if the related boxes are turned off.

Again Thanks
Jim

PS If you have nothing to do (Ha fat chance huh) do you know of a way to solve my ? in this thread >
https://www.zen-cart.com/forum/showthread.php?p=891966#post891966
No harm no foul if you don't have time.

20 Sep 2010, 5:29 PM
#93
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Titles Support Thread

Thanks for the note. If there is an error message, it needs to be fixed rather than turned off. I'll check those other files for the same kind of bug if relevant, and will be setting up a new test site soon so I can test things myself again.

27 Sep 2010, 1:29 AM
#94
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Titles Support Thread

I'm not sure why you were having problems with sidebox or centerbox titles, but I have tested the complete mod in Firefox, IE8 and IE "compatibility" and found it to work correctly.

Images for Titles v2.0 is now available in Free Addons.

Moved image replacement to function for more flexible use,
added easy image filetype define,
added image replacement for subcat names in category listing.

Base files up to date as of v1.3.9f.

29 Sep 2010, 11:01 PM
#95
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Re: Image Titles Support Thread

Glenn,

Does v2.0 of this mod support looking up a separate image for each month, using strftime('%B') ??

I am currently using v1.2 of this mod and I had modified new_products.php to replace all references to '/centerboxhead-new.gif') with '/centerboxhead-new-' . strftime('%B') . '.gif')

This would then find the appropriate centerboxhead-new-nameofmonth.gif image file in the /buttons/english folder.

In testing v2.0 of this mod (I have a test build of an upgraded 1.3.9f site), I cannot get this functionality to work. It will not replace the centerboxhead text with an image based on current month. It appears the code has changed a bit in new_products.php and I am not sure how to tweak it.

I tried changing 'centerboxhead-new' to 'centerboxhead-new-' and also added '.gif'), but can't seem to get this to work.

NOTE:
If I add a centerboxhead-new.gif file, it replaces the text with that image just fine. It just won't recognize the other files based on the month (e.g., centerboxhead-new-September.gif).
The new version is working great for everything else (changing the category sidebox header text to image), so I know I have the mod installed correctly.

29 Sep 2010, 11:19 PM
#96
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Titles Support Thread

I didn't add the month or category image feature, because that would not find the basic (non-cat, non-dated) versions of the images for those who don't have specific ones. You should be able to make the same modification as you did previously, by editing the second parameter in the title_image_exists() function call in /includes/modules/your_template/specials_index.php:```php
if ($specials_index->RecordCount() > 0) { //image titles - box header image if file exists
//$title = '<h2 class="centerBoxHeading">' . title_image_exists(sprintf(TABLE_HEADING_SPECIALS_INDEX, strftime('%B')), 'centerboxhead-specials') . '</h2>';
$title = '<h2 class="centerBoxHeading">' . title_image_exists(sprintf(TABLE_HEADING_SPECIALS_INDEX, strftime('%B')), 'centerboxhead-specials-' . strtolower(strftime('%B'))) . '</h2>';
$zc_show_specials = true;
}

Name the images like centerboxhead-specials-month.gif (all lowercase).
29 Sep 2010, 11:35 PM
#97
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Titles Support Thread

If you replace this section of specials_index.phpphp if ($specials_index->RecordCount() > 0) { //image titles - box header image if file exists $title = '<h2 class="centerBoxHeading">' . title_image_exists(sprintf(TABLE_HEADING_SPECIALS_INDEX, strftime('%B')), 'centerboxhead-specials') . '</h2>'; $zc_show_specials = true; } with this```php
if ($specials_index->RecordCount() > 0) { //image titles - box header image (for month) if file exists
if(title_image_exists('', 'centerboxhead-specials-' . strtolower(strftime('%B')))){
$title = '<h2 class="centerBoxHeading">' . title_image_exists(sprintf(TABLE_HEADING_SPECIALS_INDEX, strftime('%B')), 'centerboxhead-specials-' . strtolower(strftime('%B'))) . '</h2>';
}else{
$title = '<h2 class="centerBoxHeading">' . title_image_exists(sprintf(TABLE_HEADING_SPECIALS_INDEX, strftime('%B')), 'centerboxhead-specials') . '</h2>';
}
$zc_show_specials = true;
}

30 Sep 2010, 3:05 AM
#98
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Re: Image Titles Support Thread

I am modifying new_products.php, not specials_index.php. It looks as though it's the same fix to make the modification in the other file.

I applied your first suggested fix of commenting out the existing line and then adding the new modified line with the strtolower(strftime('%B')) added. This appears to have done the trick as the image for the month is now showing up.

Thanks for the assistance Glenn!

30 Sep 2010, 11:59 AM
#99
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Titles Support Thread

I noticed that after I had posted the code. I worked on the new products file, but that is much more complicated to do the full alternatives in, and I went off to bed before posting it. I'll have a version with the same flexibility as the original, using a new products for month - category image if it exists, then a new products for month image if it exists, then a new products image if it exists, then the standard text. After I check it a bit more, I will post that one.

1 Oct 2010, 3:22 PM
#100
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Re: Image Titles Support Thread

I guess I spoke too early... Still having trouble with new_products.php.

While the fix I applied earlier (commenting out the existing line and then adding the new modified line with the strtolower(strftime('%B')) added) worked on the main page of the site (New Products of the month text is replaced with the appropriate image), I just discovered it is not working for the Category pages that have new products.

On the Category pages where it normally would show the text "New Products of the month," it now shows a hyphen and the name of the category.

So, if the category is Blue Widgets, the section where it should say "New Products of the month," will have text only that says, - Blue Widgets (and of course no image replacement).