Using variables for other pages on index possible?

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
Post Reply
User avatar
Frost
New member
New member
Posts: 39
Joined: 24 Mar 2007, 12:53
Location: root/Italy
Contact:

Using variables for other pages on index possible?

Post by Frost »

Using variables on index possible?


I've been playing around with smilies and I am wondering what all would be involved in getting the posting body's smiley box/popup box to show up on another page. In this particular question I am wanting to be able to use it on the index_body

I know I can't use the normal variables, so what would I have to include to be able to pull the info there as well?

As a bonus it would be nice to know how to get the smiley to be input in a text box as well (like it does for posting body) ((when you click the smiley it automatically enters the code))

I figured once I figure out how to let index_body use posting_body's code, it would probably work

Thanks in advance
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor

Re: Using variables for other pages on index possible?

Post by igorw »

Do you want this to add smilies to handymans shoutbox mod? Just curious...
User avatar
Frost
New member
New member
Posts: 39
Joined: 24 Mar 2007, 12:53
Location: root/Italy
Contact:

Re: Using variables for other pages on index possible?

Post by Frost »

Yes that is part of the reason I originally thought about it, but I figured out a way to do the smilies for the chat already without using the posting body's code.

If it's all the same, now it has me curious on other things I could do with this, like using particular parts of a board on another page. Sort of like having a portal without actually having a portal.

For example I would want to add handy information from all over the board in one place on the index. I think this would have the same issues but I haven't tried it yet.
User avatar
Frost
New member
New member
Posts: 39
Joined: 24 Mar 2007, 12:53
Location: root/Italy
Contact:

Re: Using variables for other pages on index possible?

Post by Frost »

I take it I hit some sort of nerve asking this question here? I didn't know it would matter what the question was for as it was a phpbb mod question.

Seems to be a lot of this going around.
Sorry to bother you all with my questions about phpbb modding, I must have miss-interpreted the symbolism of the site's name.
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor

Re: Using variables for other pages on index possible?

Post by igorw »

I do think you should be a little more patient before saying things like that. Some members (me for example) are quite busy with their real life at the moment. Doesn't mean i forgotten about you, or that i don't care. Soooo....

I would modify chat_body.html. Here's the code from posting_editor.html:

Code: Select all

   <div id="smiley-box">
      <!-- IF S_SMILIES_ALLOWED and .smiley -->
         <strong>{L_SMILIES}</strong><br />
         <!-- BEGIN smiley -->
            <a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
         <!-- END smiley -->
      <!-- ENDIF -->
      <!-- IF S_SHOW_SMILEY_LINK -->
         <br /><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=350,resizable=yes,scrollbars=yes,WIDTH=300'); return false;">{L_MORE_SMILIES}</a>
      <!-- ENDIF -->
   </div>


Now these variables need to be assigned in index.php (see how it's done in posting.php): S_SMILIES_ALLOWED, smiley (block variable), S_SHOW_SMILEY_LINK, U_MORE_SMILIES.

Does that help?
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor

Re: Using variables for other pages on index possible?

Post by igorw »

User avatar
Frost
New member
New member
Posts: 39
Joined: 24 Mar 2007, 12:53
Location: root/Italy
Contact:

Re: Using variables for other pages on index possible?

Post by Frost »

I do not think you should have given me any help after the post I made. I was irritated at my inability to solve something on my own and after seeing most of my posts get skipped over at startrek, and never even commented on, I assumed that since you are a member there too, that I had done something wrong there and you were ignoring this post because of the relation.

After reading my post above I realize the harsh nature of it now, and I apologize.

I did not need the smiley code anymore because I figured out a hard way around it, but it does help me in the new question I asked here.

I will completely understand if you decide to remove my account here. After the way I've been treated at several support sites for asking questions, I've become rather jumpy, and since have devoted all my energies to giving back with styles and being as friendly and helpful as possible to give people a break from it. I've tainted that with what I've said here, and again I apologize.

Thank you eviL<3
User avatar
Frost
New member
New member
Posts: 39
Joined: 24 Mar 2007, 12:53
Location: root/Italy
Contact:

Re: Using variables for other pages on index possible?

Post by Frost »

Out of curiosity I tried the above for the smilies, and the variables aren't defined in posting.php for some of them, they are in includes/functions_posting

I thought the code would be different, so didn't try

Also, the smilies_allowed part wouldn't be required would it, since it's just to make them not show if they smilies have been turned off?
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor

Re: Using variables for other pages on index possible?

Post by igorw »

Frost wrote:I do not think you should have given me any help after the post I made. I was irritated at my inability to solve something on my own and after seeing most of my posts get skipped over at startrek, and never even commented on, I assumed that since you are a member there too, that I had done something wrong there and you were ignoring this post because of the relation.

After reading my post above I realize the harsh nature of it now, and I apologize.

I did not need the smiley code anymore because I figured out a hard way around it, but it does help me in the new question I asked here.

I will completely understand if you decide to remove my account here. After the way I've been treated at several support sites for asking questions, I've become rather jumpy, and since have devoted all my energies to giving back with styles and being as friendly and helpful as possible to give people a break from it. I've tainted that with what I've said here, and again I apologize.

Thank you eviL<3

I do not think you should be punished. You were a little harsh, you apologized, that's fine. No need to remove any accounts ;) Just always keep in mind that the people on any support site for phpBB are not being paid for it. It's okay to bump your topic after a few days to give everybody a reminder, but don't be harsh.
Frost wrote:Out of curiosity I tried the above for the smilies, and the variables aren't defined in posting.php for some of them, they are in includes/functions_posting

I thought the code would be different, so didn't try

Also, the smilies_allowed part wouldn't be required would it, since it's just to make them not show if they smilies have been turned off?

Oh, my mistake, well then you'll have to use the code from functions_posting.php then. The smilies allowed part is for if smilies are disabled, correct ;)
Post Reply