[Replacement] Can I change name/link to replacement?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
maciasbarlinek99
Registered User
Posts: 241
Joined: Sat Sep 29, 2012 9:15 am
Location: Polska
Name: Maciej Przyborowski
Contact:

[Replacement] Can I change name/link to replacement?

Post by maciasbarlinek99 » Sun May 25, 2014 12:44 pm

------------------------------------------------------------------------------------------------------------------------------
Board's URL: Nasze-Tematy.PL
Host's URL: OVH.PL
Package phpBB: phpBB.PL
Version of phpBB: phpBB 3.0.12 [Latest]
Language: Polish [PL]
The most recent action: Install phpBB 3.0.12
MODs installed: Styles: MySQL Version: MySQL(i) 5.1.73-1.1+squeeze+build0+1-log
PHP Version: 5.3.16
Test account:
  • Login: test
  • Password: test
------------------------------------------------------------------------------------------------------------------------------
  1. [Replacement] Can I change name/link to replacement?
    Name [PL] <----------> Name [EN] <----------> Replacement [Name &/or Link] <----------> Link
    Edycja profilu <----------> Edit Profile <----------> ? <----------> /ucp.php?i=profile&mode=profile_info
    Preferencje <----------> Preferences <----------> ? <----------> /ucp.php?i=prefs&mode=personal
    Grupy <----------> Groups <----------> ? <----------> /ucp.php?i=176
    Przyjaciele <----------> Friends <----------> ? <----------> /ucp.php?i=zebra&mode=friends
    Wrogowie <----------> Foes <----------> ? <----------> /ucp.php?i=zebra&mode=foes
    Ustawienia konta <----------> Account Settings <----------> ? <----------> /ucp.php?i=profile&mode=reg_details
    Obserwowane <----------> Subscribed <----------> ? <----------> /ucp.php?i=main&mode=subscribed
    Zakładki <----------> Bookmarks <----------> ? <----------> /ucp.php?i=main&mode=bookmarks
    Kopie robocze <----------> Drafts <----------> ? <----------> /ucp.php?i=main&mode=drafts
    Załączniki <----------> Attachments <----------> ? <----------> /ucp.php?i=attachments&mode=attachments
    Ustawienia pisania <----------> Writing Settings <----------> ? <----------> /ucp.php?i=prefs&mode=post
    Ustawienia wyświetlania <----------> Display Settings <----------> ? <----------> /ucp.php?i=prefs&mode=view
    Fill in the fields with "?" if possible
    I need replacement to name and link
------------------------------------------------------------------------------------------------------------------------------
Contact:
  • GG: [url=gg://47898833]Write[/url]
  • PW: Write
Thank you!

User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by Jessica » Sun May 25, 2014 2:47 pm

What do you mean by "replacement"?
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein

User avatar
maciasbarlinek99
Registered User
Posts: 241
Joined: Sat Sep 29, 2012 9:15 am
Location: Polska
Name: Maciej Przyborowski
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by maciasbarlinek99 » Sun May 25, 2014 8:08 pm

e.t.:
Replacement name: {L_MCHAT}
Name: mini-Chat

Replacement link: {U_INDEX}
Name: Board index

User avatar
maciasbarlinek99
Registered User
Posts: 241
Joined: Sat Sep 29, 2012 9:15 am
Location: Polska
Name: Maciej Przyborowski
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by maciasbarlinek99 » Mon May 26, 2014 12:33 pm

#Refresh

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29253
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by Marshalrusty » Mon May 26, 2014 12:36 pm

I really want to answer your question, but I have no idea what you are asking. I looked at you diagram above for a whole minute and can't figure out what you're trying to do.

Please explain
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

User avatar
maciasbarlinek99
Registered User
Posts: 241
Joined: Sat Sep 29, 2012 9:15 am
Location: Polska
Name: Maciej Przyborowski
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by maciasbarlinek99 » Mon May 26, 2014 3:01 pm

I want to use 2 language and i must use replacement.
replacement is e.t.: {U_INDEX} --> mydomain.com/index.php
{L_INDEX} - Board index

And i can't looking for all replacement. Where is it?

Replacement link e.t.: {U_INDEX}
result: mydomain.com/index.php

Replacement name e.t.: {L_INDEX}
result: Board index (EN) or Indeks witryny (PL)..

Do you understand me?

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29253
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by Marshalrusty » Mon May 26, 2014 3:13 pm

Okay, template variables, sure. Depending on which one you're trying to find, they may be defined either in a root PHP file (like viewtopic.php for viewtopic, etc.), or an includes/functions* file.

There is no way to get an exhaustive list of these because they differ based on context (where you're working from). The simplest thing would be to get a text editor that can search through all files (like Notepad++), and then you don't have to worry about guessing the correct file; just search though all of them.

For example, see the screenshot for an example of this.
Attachments
template_vars.png
template_vars.png (70.47 KiB) Viewed 1127 times
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

User avatar
maciasbarlinek99
Registered User
Posts: 241
Joined: Sat Sep 29, 2012 9:15 am
Location: Polska
Name: Maciej Przyborowski
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by maciasbarlinek99 » Mon May 26, 2014 3:20 pm

Ohh.. Thanks for information.
Look:
{L_WARNINGS}: {WARNINGS}
What is bad?
It work only in profile page.

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29253
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by Marshalrusty » Mon May 26, 2014 3:39 pm

Well, do what I said above :)

You'll find the following in memberlist.php:

Code: Select all

		'WARNINGS'		=> isset($data['user_warnings']) ? $data['user_warnings'] : 0,
That's why it's accessible in the profile. It won't be accessible in, say, viewtopic, because it's not defined there.

Depending on where you want to use it, some of this data will not be available, in which case you'll need to run a database query to retrieve it. Adding queries will also add to the resource usage of the page.

Incidentally, where are you trying to display the warning count? And why?
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

User avatar
maciasbarlinek99
Registered User
Posts: 241
Joined: Sat Sep 29, 2012 9:15 am
Location: Polska
Name: Maciej Przyborowski
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by maciasbarlinek99 » Mon May 26, 2014 5:36 pm

Hmm..
You try to help me..
Thanks.

I need warning in menu, because i've got free space.
It will be the best - information in menu.
My friend and I need this.
Can you help me with it?

User avatar
maciasbarlinek99
Registered User
Posts: 241
Joined: Sat Sep 29, 2012 9:15 am
Location: Polska
Name: Maciej Przyborowski
Contact:

Re: [Replacement] Can I change name/link to replacement?

Post by maciasbarlinek99 » Wed May 28, 2014 12:36 pm

#Refresh

Locked

Return to “[3.0.x] Support Forum”