How To add new gifs?

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
MartinTruckenbrodt
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany
Contact:

How To add new gifs?

Post by MartinTruckenbrodt »

Hello,
how to add new gifs to phpBB3?

I've made a entry at the imageset.cfg . IMO I've done it with the correct syntax.
But the image is not displayed.

What could be the problem?
Which steps are necessary too?

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
MartinTruckenbrodt
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany
Contact:

Re: How To add new gifs?

Post by MartinTruckenbrodt »

Hello,
I saw that I have to have an entry in the phpbb_styles_imageset table and to activate the image in the ACP under STYLES -> Imagesets after refreshing template and theme.

But it is still not running.

IMO it seems that this is not finished in phpBB3 beta1.

Please try it yourself and give me a feedback.

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
User avatar
poyntesm
Registered User
Posts: 176
Joined: Fri May 13, 2005 4:08 pm
Location: Dublin, Ireland
Contact:

Re: How To add new gifs?

Post by poyntesm »

Martin,

Did you ever get this working?

I am looking at the same at the moment. I so far think you have to create the DB entry. Then decide if you want it to be under an existing imageset category or a new one.

In language/en/acp/styles.php you add the new category

Code: Select all

IMG_CAT_XXXXX'		=> 'Your XXXXX image category',
Then in includes/acp/acp_styles/php where imageset_keys is defined

Code: Select all

			'xxxxx'		=> array(
				'xxxxx_image',
			),
You will then need to have xxxxx_image in the table you mentioned.

I am only posting as I have been looking at it at the moment. I may be wrong and there may be functions defined to help with all this, but so far I have no found them and I think the above will work. So take all this is just a helpful pointer and not bible.
MartinTruckenbrodt
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany
Contact:

Re: How To add new gifs?

Post by MartinTruckenbrodt »

Hello,
at the moment I'm not working on my test enviroment. I will test it next weeks.

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
Gumfuzi
Registered User
Posts: 232
Joined: Wed Apr 26, 2006 7:04 pm

Re: How To add new gifs?

Post by Gumfuzi »

*push*
any new ideas about this?
MartinTruckenbrodt
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany
Contact:

Re: How To add new gifs?

Post by MartinTruckenbrodt »

Hello,
look at the css files too.

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
Gumfuzi
Registered User
Posts: 232
Joined: Wed Apr 26, 2006 7:04 pm

Re: How To add new gifs?

Post by Gumfuzi »

thanks for your reply.

i did so far:
1.) uploaded an button image (png) to the folder on FTP
2.) insert into css:

Code: Select all

/* Big button images */
.bookmark-icon, .bookmark-icon a			{ background: transparent none 0 0 no-repeat; }

Code: Select all

/* Set big button dimensions */
.buttons div.bookmark-icon		{ width: {IMG_BUTTON_BOOKMARK_WIDTH}px; height: {IMG_BUTTON_BOOKMARK_HEIGHT}px; }

Code: Select all

/* Icon images ---------------------------------------- */
..... .rtl  .icon-bookmark, ..... {
	background-position: 100% 50%;
	padding: 1px 17px 0 0;
}

Code: Select all

Colours and backgrounds for buttons.css
.bookmark-icon, .bookmark-icon a
{ background-image: url("{IMG_BUTTON_BOOKMARK}") ;}

3.) to inset the Button, i wrote this into the template:

Code: Select all

<!-- IF U_BOOKMARK_TOPIC -->
<div class="bookmark-icon"><a href="{U_BOOKMARK_TOPIC}"><span>{L_BOOKMARK_TOPIC}</span></a></div>
<!-- ENDIF -->
4.) imageset.cfg (within laguage folder):

Code: Select all

img_button_bookmark = button_mark_new.png*25*87
but firebug will show an empty definition within the CSS:

Code: Select all

.buttons div.bookmark-icon {
}
.buttons div {
background-position:0pt 100%;
float:left;
margin:0pt 5px 0pt 0pt;
}
.bookmark-icon, .bookmark-icon a {
background-image:url({IMG_BUTTON_BOOKMARK});
}
.bookmark-icon, .bookmark-icon a {
background:transparent none no-repeat scroll 0pt;
}
* {
margin:0pt;
padding:0pt;
}
as you can see, the
"background-image:url({IMG_BUTTON_BOOKMARK});"
indicates, that the real image url is not pasted into the css code.
And the last (top) declaration contains nothing.

so there must be something missing. what did i forgot?

or is it easier to use one of the user defined images within the ACP? i can already set within the ACP, upload via FTp but how do i call those user difined buttons within the templates or CSS code? maybe "{USER1}" etc.?

many thanks for your help and tips!
User avatar
poyntesm
Registered User
Posts: 176
Joined: Fri May 13, 2005 4:08 pm
Location: Dublin, Ireland
Contact:

Re: How To add new gifs?

Post by poyntesm »

You will need to add a new entry to includes/acp/acp_styles.php, language/en/acp/styles.php & also look at adding to phpbb_styles_imagetset_data.

Think of the top of my head those are the bits you have missed. Its not easy to add a new image anymore.
Gumfuzi
Registered User
Posts: 232
Joined: Wed Apr 26, 2006 7:04 pm

Re: How To add new gifs?

Post by Gumfuzi »

thank you - i will try this!

or is it easier to user one of the custom defineable buttons which also can be set within the ACP?
User avatar
poyntesm
Registered User
Posts: 176
Joined: Fri May 13, 2005 4:08 pm
Location: Dublin, Ireland
Contact:

Re: How To add new gifs?

Post by poyntesm »

In my mind no. What if another MOD wants to use user defined 1 then you would need to update its template code.
Post Reply