Jump to content

Featured Replies

Posted

With some issues I was able to upgrade to v5. Thank you to invision excellent support for helping with the upgrade issue. Here are some things I need help with.

  1. home page Fluid View. My home page was always on this mode. But after the upgrade this was reset and I can't find where is the setting for setting the home page to Fluid View. i think it should be under forums > settings, but I don't see it there.

  2. Can we directly edit the templates? add code? I can't find a way to do it like we used to do it in v4.

  3. How do we add, edit, remove widgets from a page? v4 used to have a sidebar with widgets which I can't find/open in v5.

Thank you.

Hi there,

  1. You can change the view by clicking your username and going to Account Settings > Content Preferences. Make sure "Change layout views" is enabled, and then select "Fluid" from the options.

  2. Directly editing the HTML of themes has been removed in v5. Instead, you can now use template hooks to inject custom HTML into your theme. You can also use javascript to inject HTML depending on your requirements. Editing the CSS is the same as version 4 - done via adding your own to the Custom CSS area (in the Theme Editor).

  3. The Page Editor is available by clicking your avatar at the top of the page and selecting Page Editor.

I hope that helps!

  • Author

Thank you @Ehren

will the solution for number 1. change it for all users or just me? i want to change it for everyone, set it as a default view.

  1. is there some documentation on using hooks, javascript for injecting into the templates? I need a simple conditional statement to insert the google auto ads code.

  2. and accessing the page editor, making changing this way will change for everyone or just me?

Just now, virap1 said:

1. change it for all users or just me? i want to change it for everyone, set it as a default view.

That can be done in the Theme Editor. Click your username, select Theme Editor and browse to Page Layouts. You can set all of the default values there.

1 minute ago, virap1 said:

is there some documentation on using hooks, javascript for injecting into the templates? I need a simple conditional statement to insert the google auto ads code.

Using the Advertisements feature might be better than template hooks in this situation. ACP > System > Site Promotion > Advertisements.

2 minutes ago, virap1 said:

and accessing the page editor, making changing this way will change for everyone or just me?

The Page Editor is the same as version 4. Changing it will change it for everyone.

I've got a question too.

Is there a way category with ID 1 to look like a Grid and the category with ID 2 to look like a Table?

  • Author

@Ehren I would love to use the Advertisements solution but I don't think it can do that only by using it and therefore I was also using template conditionals.

In v4 I actually had the ad code in Advertisements, then I specified custom location and placed the ad code in <head>. Now that custom locations are removed how I can place the adsense auto ads code in the head?

Also, I need to show the ads everywhere except to specific forum as the content in those forums might violate the adsense TOS. So inside the global template I was using conditionals to check for forum ids before displaying the ads.

So now I don't now how to display the ad code inside head or check if the topic belongs to specific forums where the ads should not be displayed.

Any ideas how to achieve this? Thank you.

You can create a Custom Template for your theme in the ACP. Each theme has a menu option for "Theme Designer: Templates" (if Theme Designer is enabled).

You can inject code at one of the many available hook points; the one you want is System -> front/global/globalTemplate -> head.

  • Author

Thank you @Esther E.

So under templates I create custom reusable template or a hook? either, both?

When i pick Hook Application: System then under System dropdown below there is no front/global/globalTemplate -> head under system.

can we use template conditionals in Content field of custom templates?

  • Management
14 minutes ago, virap1 said:

Thank you @Esther E.

So under templates I create custom reusable template or a hook? either, both?

When i pick Hook Application: System then under System dropdown below there is no front/global/globalTemplate -> head under system.

can we use template conditionals in Content field of custom templates?

I can take a look at this for you tomorrow morning.

  • Author

2 more v5 questions. I would appreciate if someone can provide a solution.

  1. in v4 when editing a database record/article or forum post, there was an option to view the source code of the post, database record. Can this be done in v5?

  2. is there a way to change the size of youtube embeds? or perhaps to make them responsive?

10 hours ago, virap1 said:

in v4 when editing a database record/article or forum post, there was an option to view the source code of the post, database record. Can this be done in v5?

Source mode is not something that is an option any longer, with the change of the editor

10 hours ago, virap1 said:

is there a way to change the size of youtube embeds? or perhaps to make them responsive?

There is an open bug report for this currently.

  • Author
3 hours ago, Marc said:
  13 hours ago, virap1 said:

in v4 when editing a database record/article or forum post, there was an option to view the source code of the post, database record. Can this be done in v5?

Source mode is not something that is an option any longer, with the change of the editor

That is not good at all. For me it is a basic and critically important functionally to check for hidden links in spam posts, edit api submitted content. Now there is simply no way to achieve this.

47 minutes ago, virap1 said:

That is not good at all. For me it is a basic and critically important functionally to check for hidden links in spam posts, edit api submitted content. Now there is simply no way to achieve this.

Could you give me an example of hidden links you mean? Nobody should really be able to do something like this, as they cant post HTML in the first place.

In terms of API submitted content, you should really be sanitising content before adding content via the API.

  • Author

sometimes the new accounts posting spam will insert normal hyperlinked string but change the color so the text does not appear as hyperlink and it is easy to miss while moderating. i use the word filter to do basic filtering and flagging any new content from new accounts containing https etc. Being able to view the source of the post to verify the presence of anything spammy was a part of the my workflow.

I do sanitize api content but event then sometimes basic reviewing, editing the source html was good. But that is ok. I can probably adjust to editing without that.

At the moment my worst problem is not having any way to properly insert the adsense auto ads code into the <head>.

This is kind of critical because every day I lose money unless i find a solution for that.

I need to insert/show the adsense auto ads code into the <head> when:

1. the user is a guest/not logged in AND 2. show the code everywhere except in 2 forums and topics assigned to these 2 forums.

14 minutes ago, virap1 said:

At the moment my worst problem is not having any way to properly insert the adsense auto ads code into the <head>.

This is kind of critical because every day I lose money unless i find a solution for that.

I need to insert/show the adsense auto ads code into the <head> when:

1. the user is a guest/not logged in AND 2. show the code everywhere except in 2 forums and topics assigned to these 2 forums.

You could use the Google Analytics integration to add things to the head section if needed

15 minutes ago, virap1 said:

sometimes the new accounts posting spam will insert normal hyperlinked string but change the color so the text does not appear as hyperlink and it is easy to miss while moderating. i use the word filter to do basic filtering and flagging any new content from new accounts containing https etc. Being able to view the source of the post to verify the presence of anything spammy was a part of the my workflow.

Please do provide examples when you have them. We want to ensure people can do the things they need to do. However editing HTML is not the way forward.

  • Author
53 minutes ago, Marc said:

You could use the Google Analytics integration to add things to the head section if needed

how that would achieve my objective of showing the code to guests only everywhere except for content in 2 forums? Can I put template conditional in the analytics code field?

It would just give a location to add code. I will tag developers on this to see if we have a solution for that

  • Author

@Marc before custom templates/hooks were suggested above in this topic as a possible solution.

Can I create a custom template with a hook and put the template conditional statement within the Content field?

I don't think that field supports conditional statements.

Yes, you can use conditional statements in template hooks, the same as you could in templates

9 minutes ago, virap1 said:

But, I don't see how anything mentioned there can do what I need as there is no way to run conditional statements within custom templates to check if the page viewed is one of the forums where adsense should not appear.

You can definitely put logical statements into your custom templates.

  • Author

Thank you @Marc and @Esther E.

This is what I have now in the custom template

1.png

and this is what I end up with.

2.png

What I am doing wrong?

  • Author

@Jim M Thank you so much! I checked, fixed the syntax and it works now.

Now, how do I use a hook that will insert my code into the global page header inside the <head> tag.

Above, System -> front/global/globalTemplate -> head was mentioned. But I don't see that option.

56 minutes ago, virap1 said:

Now, how do I use a hook that will insert my code into the global page header inside the <head> tag.

Do you mean <header>? If so, that is System -> front/global/pageHeader

<head> is generally for some Javascript, CSS, meta tags, etc...

  • Author

I need it inside the <head> as that is where the auto ads javascript goes.

Recently Browsing 0

  • No registered users viewing this page.