Add HTML to contact mailing address; Don't make it required

Under contact, I would like to see HTML capabilities added to the mailing address field, so the address can be displayed like this:

Joe Doe
123 University Street
Anytown, USA

Rather than this: Joe Doe, 123 University Street, Anytown USA.

I’d also like to not have this be a required field for institutions that don’t want items mailing them. At this time, you can’t leave it blank.

Hi @jaskoog,

Off the top of my head, I don’t think that’s a required field. Where are you seeing it required?

Also, where is it displaying inline?

Regards,
Alec Smecher
Public Knowledge Project Team

If you don’t enter test, it tells you the field is required:

It displays in-line here:

http://journal.viterbo.edu/index.php/atpp/about/contact

Hi @jaskoog,

There’s a nl2br Smarty filter on the display of the address, so newline characters in the settings should result in <br/> elements being added. Are you sure that field doesn’t have the content all entered on one line?

Regards,
Alec Smecher
Public Knowledge Project Team

I just tried entering it like this:

Viterbo University
900 Viterbo Drive
La Crosse, WI 54601

But it displayed in-line. Next, I tried adding
and

tags but they did nothing.

Hi @jaskoog,

I’m afraid I’m having trouble replicating this behavior. Could you try executing this in your database?

 select * from journal_settings where setting_name='mailingAddress';

Regards,
Alec Smecher
Public Knowledge Project Team

I am having the same issue.
I have tried any possible html tag for line breaking (<br>, <p>, <div>, with and without slash), both in the dashboard and directly in the db.

Here is what is written in the dashboard field:

CLARA Architecture/Recherche
Facult&eacute; d&#39;Architecture La Cambre Horta, Universit&eacute; libre de Bruxelles
Pl. Flagey, 19
1050 - Bruxelles
BELGIQUE

And here is the answer to the recommended query select * from journal_settings where setting_name='mailingAddress'

CLARA Architecture/Recherche

Faculté d'Architecture La Cambre Horta, Université libre de Bruxelles

Pl. Flagey, 19

1050 - Bruxelles

BELGIQUE

And here is the final result: http://clararevue.ulb.be/OJS/index.php/CLARA/about/contact
Some hints?

Hi @afisher,

I think the issue is that you’re using CSS classes that have defined styles from elsewhere in OJS. Try removing those classes or renaming them to something else.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Thank you for the prompt response. I realize there must be a long list of post requiring your attention, however, it would greatly benefit the forum not to give for granted that users are in fact experienced developers.
In short, I am not aware of using

unless the fact that I have installed the Bootstrap3 theme plugin could cause that?
In any case, I would not know from where to start to

Would you consider putting me on the right track?
Thank you again.
Regards,
Axel F
CLARA Architecture/Recherche Journal

Hi @afisher,

Sorry, we have a huge mix of skillsets here and I often make the wrong assumptions.

Can you check what your allowed_html setting is in the config.inc.php configuration file?

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher,
This makes more sense.
The values are (copied from 2.4.7 configuration file as was before upgrade):
allowed_html = "<a href|target> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <b> <i> <u> <img src|alt> <sup> <sub> <br> <p>"
Does this help?

Thank you

Hi @afisher,

Ah, that’s the issue. The syntax for that setting has changed – see config.TEMPLATE.inc.php for the new syntax. You should be able to just copy that default setting over to your config.inc.php. Once the changed setting is in place, try reloading the Contact page again – you shouldn’t need to e.g. edit the mailing address or anything before the change will be visible.

Regards,
Alec Smecher
Public Knowledge Project Team

Perfect, thanks @asmecher.
You could consider this topic as SOLVED.
Regards,
Axel