• Page 1 of 1
  • 1
Forum moderator: bigblog  
How to make a time line on user profile page?
Harina
Posts: 62
Reputation: 0

Message # 1 | 4:54 AM
I want a informer to display latest post on file catalog of a user on their profile page as a timeline. Which condition to use? I have use ajax load but javascript will not working inside div loaded with ajax. I want to display latest post in carousel like below

Code
     <div id="containerOT">
<!-- hero bg start -->
        <div class="hero-fullscreen">
            <!-- timeline container start -->
            <div class="hero-bg timeline-container">
                <div class="timeline">
                    <!-- swiper container start -->
                    <div class="swiper-container">
                        <!-- swiper wrapper start -->
                        <div class="swiper-wrapper">

<!-- latest post one -->
<div class="swiper-slide overlay cover-all" data-year="$DATE$" style="background-image: url($IMG_URL1$);">
<div class="swiper-slide-content">
<span class="timeline-year">$DATE$</span>
<h4 class="timeline-title">
Latest post one
</h4>
<p class="timeline-text">
<?if(len($MESSAGE$)>141)?><?substr($MESSAGE$,0,137)?>...
<?else?>$MESSAGE$<?endif?>
</p>
</div>
</div>
<!-- latest post one -->

<!-- latest post two -->
<div class="swiper-slide overlay cover-all" data-year="$DATE$" style="background-image: url($IMG_URL1$);">
<div class="swiper-slide-content">
<span class="timeline-year">$DATE$</span>
<h4 class="timeline-title">
Latest post one
</h4>
<p class="timeline-text">
<?if(len($MESSAGE$)>141)?><?substr($MESSAGE$,0,137)?>...
<?else?>$MESSAGE$<?endif?>
</p>
</div>
</div>
<!-- latest post two -->

<!-- latest post three -->
<div class="swiper-slide overlay cover-all" data-year="$DATE$" style="background-image: url($IMG_URL1$);">
<div class="swiper-slide-content">
<span class="timeline-year">$DATE$</span>
<h4 class="timeline-title">
Latest post one
</h4>
<p class="timeline-text">
<?if(len($MESSAGE$)>141)?><?substr($MESSAGE$,0,137)?>...
<?else?>$MESSAGE$<?endif?>
</p>
</div>
</div>
<!-- latest post three -->

<!-- latest post four -->
<div class="swiper-slide overlay cover-all" data-year="$DATE$" style="background-image: url($IMG_URL1$);">
<div class="swiper-slide-content">
<span class="timeline-year">$DATE$</span>
<h4 class="timeline-title">
Latest post one
</h4>
<p class="timeline-text">
<?if(len($MESSAGE$)>141)?><?substr($MESSAGE$,0,137)?>...
<?else?>$MESSAGE$<?endif?>
</p>
</div>
</div>
<!-- latest post four -->

                        </div>
                        <!-- swiper wrapper end -->
                        <!-- swiper navigation start -->
                        <div class="swiper-button-prev fadeIn-element"></div>
                        <div class="swiper-button-next fadeIn-element"></div>
                        <div class="swiper-pagination fadeIn-element"></div>
                        <!-- swiper navigation end -->
                    </div>
                    <!-- swiper container end -->
                </div>
            </div>
            <!-- timeline container end -->
        </div>
        <!-- hero bg end -->

   <!-- css -->
<link href="http://www.bendella.com/global_assets/timeline.css" media="all" rel="stylesheet" type="text/css">
<!-- css -->

       <!-- scripts start -->
        <script src="http://www.11-76.com/themes/the-one-responsive/js/plugins.js" type="text/javascript">
        </script>
        <script src="http://www.bendella.com/global_assets/the-one.js" type="text/javascript">
        </script>
     <!-- scripts end -->



Here is a working demo

http://bendella.com/index/0-31
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 2 | 10:49 AM
Harina, put the script on the profile page instead?

Quote Harina ()
http://www.bendella.com/global_assets/the-one.js

don't use absolute URLs

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
Harina
Posts: 62
Reputation: 0

Message # 3 | 11:11 AM
bigblog, yes i put script on the profile page and it dont work well. What do you mean by absolute URLs?
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 4 | 2:27 PM
Harina, i'll try to figure out a solution for this, at the moment however, using javascript in an ajax windows doesn't seem possible

Quote Harina ()
What do you mean by absolute URLs?

instead of https://whatever.bla/path/to/something use /path/to/something, it will help you prevent inconveniences like this: https://forum.ucoz.com/forum/8-21641-1

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
  • Page 1 of 1
  • 1
Search: