Forum Activity for @pch

pch
@pch
09/05/16 01:03:09AM
328 posts

Scroll To Top Button not working on all the pages


Using Jamroom

Hi Michael,

Our site is still under construction.

As recommended by Brian in the Tutorial, bellow is the code to add in the ready function in the meta.tpl:

$(window).scroll(function(){
    if ($(this).scrollTop() > 100) {
        $('.scrollup').fadeIn();
    } else {
        $('.scrollup').fadeOut();
    }
});

$('.scrollup').click(function(){
    $("html, body").animate({ scrollTop: 0 }, 600);
    return false;
});

After adding the code, the ready fonction looks like this:

{if isset($javascript_ready_function)}
<script type="text/javascript">
$(document).ready(function(){
$(window).scroll(function(){
    if ($(this).scrollTop() > 100) {
        $('.scrollup').fadeIn();
    } else {
        $('.scrollup').fadeOut();
    }
});

$('.scrollup').click(function(){
    $("html, body").animate({ scrollTop: 0 }, 600);
    return false;
});
{$javascript_ready_function}return true;
});
</script>
{/if}

Putting the code in the ready function in the meta.tpl works in few pages only (admin pages), only on pages where the ready function is called.

This is because other pages from the frontend like: index, profile, audio, video etc do not load the ready fonction in the meta tag.

Any help?

Thanks
pch
@pch
08/16/16 02:36:30PM
328 posts

Scroll To Top Button not working on all the pages


Using Jamroom

Hello,

I have followed the tutorial found here:

https://www.jamroom.net/the-jamroom-network/forum/suggestions/2152/back-to-top-scroll-to-top-button

I've added the code to meta.tpl and to the footer.tpl and the profil_footer.tpl.

I also added the following style code to my skin.css

.scrollup {
    width: 40px;
    height: 40px;
    opacity: 0.3;
    position: fixed;
    bottom: 10px;
    right: 10px;
    display: none;
    text-indent: -9999px;
    background: url('http://www.site.com/skins/myscustomskin/img/icon_top.png') no-repeat;
}

It works fine but works only on few pages like on the profile timeline, few admin pages. On many other pages like the home page,the audio page etc. It doesn't work (it doesn't show).

Am I missing something?

Thanks for helping
updated by @pch: 12/19/16 11:04:20AM
pch
@pch
08/13/16 02:36:05PM
328 posts

Advise on Creating a Custom Page


Using Jamroom

paul:
www.site/audio by default will call the jrAudio module's index.tpl template.
You can overide this by placing a template called jrAudio_index.tpl into you active skin folder.
Any additional URL parameters are then passed to the template via the $_post array so for www.site/video/categoryname_1 {$_post.option} = 'categoryname_1'
So what you would have to do is place all your different audio category template code into the one jrAudio_index.tpl template and switch between them with {if} statements -
{if $_post.option == 'categoryname_1'}
    // 'categoryname_1' code here
{elseif $_post.option == 'categoryname_2'}
    // 'categoryname_2' code here
{elseif $_post.option == 'categoryname_3'}
    // 'categoryname_3' code here
{elseif $_post.option == 'categoryname_4'}
    // 'categoryname_4' code here
{/if}
hth

Hi Paul,

I have done your suggestion.

I am able to visite www.site/audio/categoryname_1 and www.site/video/categoryname_1

But unfortunatly it has completly overwritten my defautl buitl-in JR audio and video page. I didn't want to overwrite them.

Also genarated pages like: www.site/audio/categoryname_1, www.site/audio/categoryname_2, www.site/audio/categoryname_3 are not picked up by the Meta Tag broweser. So there is no way to add Meta tag to these pages.

From the Meta Tag Browser, I can only see: jrAudio_index.tpl and jrVideo_index.tpl

Also, I added a sidebar to jrAudio_index.tpl and jrVideo_index.tpl like this:

{jrCore_include template="sidebar.tpl"}

Unfortunatly it doesn't show on www.site/audio/categoryname_1, www.site/audio/categoryname_2

Please help.
updated by @pch: 09/05/16 04:20:05AM
pch
@pch
08/13/16 02:18:02PM
328 posts

Advise on Creating a Custom Page


Using Jamroom

michael:
#1 Check out these docs, let us know if there is anything you don't understand after reading it and I'll get it updated for everyone.
Docs: "altering a module's template"https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/1051/altering-a-modules-template
#2 yes, the meta tag module will allow you to add tags to template you add to your skin.
#3 yes.
#4 yes. As long as you set it up.
Docs: "{jrCore_list} : Pagination"https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/89/jrcore-list#pagination

Hi Michael

Thanks for the Docs.
pch
@pch
08/09/16 02:39:26PM
328 posts

Advise on Creating a Custom Page


Using Jamroom

@ultrajam and @paul :

Thank you both for your replies.

@paul :

Awesome! That sounds good. Thanks a lot for the code.

I have few questions with the code you posted:

1) Will the audio or video index remain and still work? (e.: site.com/audio) I don't want to remove it.

2) Will I be able to add/edit Meta tags to generated pages like e.g: www.site/video/categoryname_1 using the JR Meta tags editor?

3) Will these pages be indexed by Search Engines (Google, Yahoo etc)

4) I will list all the files of a specific audio or video category. Will the pagination work?

Thanks for the great support.
pch
@pch
08/09/16 12:06:39PM
328 posts

Full width Image on the home page


Using Jamroom

douglas:
I've actually added back in the min and max widths, it works better for mobile that way.

Hi Douglas,

Yep, I have tested it several time it works well only with the min and max widths specially on mobile. Thanks for adding it back.

By the way, would you mind removing the site screenshot you posted in your previous post. As I mentionned earlier, the site is still under-reconstruction and I am busy working on it. Many things will be changed included the home page image which isn't even ready yet. I haven't disclosed the site yet and I even blocked Searches Engine bots from indexing it while I am busy working on it. Once everything is done, the site will go public. That is why I sent you the url and the admin credential by email. Thanks a lot.

douglas:
You might try something like this, create an anchor tag where you want the scroll button to take you to.

I will give it a try and let you know.

Thanks a lot for the great support. You are The Best, Douglas.
pch
@pch
08/06/16 02:26:19PM
328 posts

Full width Image on the home page


Using Jamroom

douglas:
I don't believe there is a scroll down function for the Elastic skin.

So, any idea on how to get that arrow down botton scroll down when you click on it. I have manage to display the arrow icon but I can not get it work.

Thanks
pch
@pch
08/06/16 02:24:16PM
328 posts

Full width Image on the home page


Using Jamroom

douglas:
You actually don't need the min-width and max-width elements since the backround-position element doesa the same thing, I've removed them for you.

Hi Douglas!

The problem is back when you remove min-width and max-width and take back backround-position. Is the image displaying well from your side? from my side, it is cut off at the right side. Even on mobile the image doesn't get responsive. It doesn't fill the full screen.

Please advise. Thanks
pch
@pch
08/06/16 02:18:28PM
328 posts

Advise on Creating a Custom Page


Using Jamroom

Anyone with a good advise? Thanks
pch
@pch
08/06/16 02:17:15PM
328 posts

How to add the who is online for the entire site?


Using Jamroom

Hi Douglas,

Thanks a lot. I will give it a try and let you know. Also I will be waiting for the fix to the Whos Online issue.

Thanks for the support.
  8