1
Bassman
Replace block title with image hack.
  • 2005/1/10 22:02

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


I found the one in the forums by BradM but i'm sure I saw another one somewhere that doesn't require changing anything but theme.html. My memory is failing me now, but i'm sure it involved putting a bit of if/else code into the theme and replacing <{blocktitle}> with <{blocktitle}>.gif. Sorry if this is a bit vague, I have searched but can't find what i'm looking for.
Any ideas?

2
Bassman
Re: Replace block title with image hack.
  • 2005/1/11 0:14

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Bump :) Sorry, I don't want this to fall from view.

3
Bassman
Re: Replace block title with image hack.
  • 2005/1/11 2:34

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


OK, i've worked some of it out, but I need a bit of help with the coding: I've changed theme_blockleft.html from

Quote:

<{$block.title}>

<{$block.content}>


to
Quote:



<{$block.content}>



But this shows only the images that are there, and the dreaded red X for those that aren't. How can I code it to use the normal block title if the image isn't there?

4
Bassman
Re: Replace block title with image hack.
  • 2005/1/11 8:37

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Bumperoony

5
LazyBadger
Re: Replace block title with image hack.

Quote:

How can I code it to use the normal block title if the image isn't there?

I'm afraid - you can't do it with HTML and Smarty.
From other side - your solution of using <{$block.title}>.jpg is not portable and windows-centric. Block titles can (and have most times) spaces between words, and spaces is disabled char in filename in *Nix.world.
I think about something like (after you'll solve "filename problem") extending login procedure (or periodical job) in PHP
- get blocks list
- get images list
- generate with GD images for missing block-titles

As starting point for this task you can see at GD-Theme in e107 (where images for blocktitles generated automatically)

6
Bassman
Re: Replace block title with image hack.
  • 2005/1/11 20:33

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Well, I did manage to get it working with a single image with a space in the middle - "Main Menu", it's just a matter of having something else in place if the block title image doesn't exist.

I'm sure it can be done - anyone else have any ideas?

Login

Who's Online

459 user(s) are online (323 user(s) are browsing Support Forums)


Members: 0


Guests: 459


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits