Reply image variable

Discussion forum for MOD Writers regarding MOD Development.
Assamita
Registered User
Posts: 140
Joined: Mon Apr 06, 2009 9:50 am

Reply image variable

Post by Assamita »

Dear all,

in styles/prosilver/template/viewtopic_body.html we find the following code:

Code: Select all

<div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
from where I suppose {L_POST_REPLY} indicates the reply image (as it's the argument between <a href> and </a>).
The fact is that I've added a button just next to it, but I need to edit some file to let it know that that has to be another image (let's say to assign {L_QUICK_REPLY} to a quick reply image I've already set at the ACP). Wich is the file that associates that {L_QUICK_REPLY} to the quick reply image I've set at the ACP?

Thank you
User avatar
KevC
Support Team Member
Support Team Member
Posts: 70227
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Reply image variable

Post by KevC »

Quick reply is built in.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"
Assamita
Registered User
Posts: 140
Joined: Mon Apr 06, 2009 9:50 am

Re: Reply image variable

Post by Assamita »

Yes I know, but I'm editing it a little, customizing it. I'm doing a mix with the Advanced quick reply and the Evil quick reply, and that is the only thing left to finish. The rest works perfectly. This is how I have it now:

Image

That link shows or hides the Advanced quick reply box as the Evil quick reply does. I'm actually using this code for that:

Code: Select all

		<!-- IF not S_IS_LOCKED -->
		<div class="qreply-icon"><a href="javascript:CambiarDisplay('quick_reply');" title="{L_POST_REPLY}"><span></span>{L_POST_REPLY}</a></div><!-- ENDIF -->
I need to change and edit the {L_POST_REPLY}, but I don't know which file is it in.
(I've already edited the css)
User avatar
Rahber
Former Team Member
Posts: 2720
Joined: Tue Feb 12, 2008 3:39 pm
Location: Pakistan
Name: Rahber
Contact:

Re: Reply image variable

Post by Rahber »

L_POST_REPLY

indicates that its a language variable
and you have to search POST_REPLY in your language files i guess its in common.php


and if you want to change the image you need to edit your imageset.cfg
button_topic_reply

i dont know if they exsist with same name in your files as i dont know your language :roll:
Assamita
Registered User
Posts: 140
Joined: Mon Apr 06, 2009 9:50 am

Re: Reply image variable

Post by Assamita »

It's spanish, the files exist, and the button_topic_reply is already on the imageset.cfg but it's still not working :(
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52143
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Reply image variable

Post by Brf »

L_POST_REPLY is only test. It is not the button image.
The button image is assigned in the colours.css:

Code: Select all

.reply-icon span	{ background-image: url("{IMG_BUTTON_TOPIC_REPLY_SRC}"); }
Assamita
Registered User
Posts: 140
Joined: Mon Apr 06, 2009 9:50 am

Re: Reply image variable

Post by Assamita »

I already added a line after that like:

Code: Select all

.qreply-icon span   { background-image: url("{IMG_BUTTON_QUICK_REPLY_SRC}"); }
But what does IMG_BUTTON_TOPIC_REPLY_SRC make reference to? Maybe that's what I have to still set
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52143
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Reply image variable

Post by Brf »

That is setup by acp_styles, using the data in the imageset.cfg
Assamita
Registered User
Posts: 140
Joined: Mon Apr 06, 2009 9:50 am

Re: Reply image variable

Post by Assamita »

Ok, I've managed to solve it, but I've had to use this code at ACP->Theme:

Code: Select all

.buttons div.reply-icon		{ width: {IMG_BUTTON_TOPIC_REPLY_WIDTH}px; height: {IMG_BUTTON_TOPIC_REPLY_HEIGHT}px; }
.buttons div.quick-icon		{ width: 106px; height: 25px; }
.buttons div.post-icon		{ width: {IMG_BUTTON_TOPIC_NEW_WIDTH}px; height: {IMG_BUTTON_TOPIC_NEW_HEIGHT}px; }
.buttons div.locked-icon	{ width: {IMG_BUTTON_TOPIC_LOCKED_WIDTH}px; height: {IMG_BUTTON_TOPIC_LOCKED_HEIGHT}px; }
.buttons div.pmreply-icon	{ width: {IMG_BUTTON_PM_REPLY_WIDTH}px; height: {IMG_BUTTON_PM_REPLY_HEIGHT}px; }
.buttons div.newpm-icon		{ width: {IMG_BUTTON_PM_NEW_WIDTH}px; height: {IMG_BUTTON_PM_NEW_HEIGHT}px; }
.buttons div.forwardpm-icon	{ width: {IMG_BUTTON_PM_FORWARD_WIDTH}px; height: {IMG_BUTTON_PM_FORWARD_HEIGHT}px; }
and:

Code: Select all

.reply-icon span	{ background-image: url("{IMG_BUTTON_TOPIC_REPLY_SRC}"); }
.quick-icon span	{ background-image: url("styles/iguania/imageset/es/button_quick_reply.gif"); }
.post-icon span		{ background-image: url("{IMG_BUTTON_TOPIC_NEW_SRC}"); }
.locked-icon span	{ background-image: url("{IMG_BUTTON_TOPIC_LOCKED_SRC}"); }
.pmreply-icon span	{ background-image: url("{IMG_BUTTON_PM_REPLY_SRC}") ;}
.newpm-icon span 	{ background-image: url("{IMG_BUTTON_PM_NEW_SRC}") ;}
.forwardpm-icon span	{ background-image: url("{IMG_BUTTON_PM_FORWARD_SRC}") ;}
(I've replaced the class name from "qreply-icon" to "quick-icon")

This makes me think that IMG_BUTTON_TOPIC_REPLY_WIDTH and IMG_BUTTON_QUICK_REPLY_SRC have to be set somewhere, but I don't know where. Any ideas?

Thank you and sorry for all this inconvenience.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52143
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Reply image variable

Post by Brf »

Brf wrote:That is setup by acp_styles, using the data in the imageset.cfg
Assamita
Registered User
Posts: 140
Joined: Mon Apr 06, 2009 9:50 am

Re: Reply image variable

Post by Assamita »

I'm assuming you mean styles/prosilver/imageset/en/imageset.cfg, right? but this is what I have there from the beginning:

img_button_topic_locked = button_topic_locked.gif*25*88
img_button_topic_new = button_topic_new.gif*25*96
img_button_topic_reply = button_topic_reply.gif*25*96
img_button_quick_reply = button_quick_reply.gif*25*96

There's not much more lines in that file where the code can be
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52143
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Reply image variable

Post by Brf »

Yes. That is the data. The code is in acp_styles.php
Assamita
Registered User
Posts: 140
Joined: Mon Apr 06, 2009 9:50 am

Re: Reply image variable

Post by Assamita »

I'm afraid it's not, at least not at mine. The only similar thing there is:

Code: Select all

'buttons'	=> array(
				'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply', 'button_quick_reply',
			),
and as you can see, I've already added a button_quick_reply. I can't see anywhere where the IMG_BUTTON_TOPIC_REPLY_SRC is.

But anyway, the way I have it it's not the best way, but at least works.

Thank you anyway.
jinkal
I've Been Banned!
Posts: 7
Joined: Thu Aug 12, 2010 6:20 pm

Re: Reply image variable

Post by jinkal »

Change the value and type and try to doing changes it works. is that varaible set are they used anyware. if not change the varaibles and can try
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52143
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Reply image variable

Post by Brf »

Assamita wrote:I'm afraid it's not, at least not at mine. The only similar thing there is:

Code: Select all

'buttons'	=> array(
				'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply', 'button_quick_reply',
			),
and as you can see, I've already added a button_quick_reply. I can't see anywhere where the IMG_BUTTON_TOPIC_REPLY_SRC is.
You can see the "button_topic_reply" right there in the array.
Adding your button_quick_reply to the array should be sufficient. Then you just Refresh your imageset in the ACP / Styles / Imagesets and you are all set.
With the image name in the database, then style.php can parse the tag from the CSS.
Starting about a dozen lines after

Code: Select all

	// Parse Theme Data
you will see the "IMG_ " and the "SRC".
Locked

Return to “[3.0.x] MOD Writers Discussion”