Sponsored Content
The Lounge War Stories Postbit Changes (Phase II Upgrade) Post 303020457 by Neo on Thursday 19th of July 2018 10:36:05 PM
Old 07-19-2018
Quote:
Originally Posted by Neo
OK.... after a lot of analysis of the postbit HTML template, the first thing which must be done is to remove the tables from the 10 $templatehooks, and and search of the DB reveals only 2 plugins are using these template hooks:


Code:
1. Thank You
    .....

Divs done in Thank You post bit.


Quote:
Originally Posted by Neo
Then, after that, the next step, based on postbit HTML analysis, is to look inside these post array items and check for table, td and tr tags since all of these are wrapped in table tags:

Code:
$post[imageattachmentlinks]
$post[otherattachments
$post[moderatedattachments]

....
For these three tables above, I already have a working solution on mobile using Swiper for attachments (and for pagination).

For example in postbit, the solution was:

Code:
<div style="font-size:1.1em;text-decoration:none;margin:10px;color:black;">
<br>$post[message]<br />

<!-- attachments -->
<if condition="$show['attachments']">
<div align="center" style="margin-top:20px;color:black;"> Attachments</div>
<div style="margin-top:15px;margin-bottom:15px;">
<if condition="$show['thumbnailattachment'] OR $show['imageattachment'] OR $show['otherattachment']">
<div class="swiper-container" >
<div class="swiper-wrapper" style="margin-bottom:15px;" align="center">
<if condition="$show['thumbnailattachment']">
$post[thumbnailattachments]
</if>
<if condition="$show['imageattachment']">
$post[imageattachments]
</if>
<if condition="$show['otherattachment']">
$post[otherattachments]
</if>

</div>

using this JS, which I can configure for desktop and make the attachments look good in the posts:

Code:
<script type="text/javascript">
    var swiper = new Swiper('.swiper-container', {
      loop: true,
      pagination: {
        el: '.swiper-pagination',
        type: 'fraction',
        clickable: true,
      },
    });
</script>


For example, I will try the Swiper "Space Between Slides" demo, but smaller:

Code:
<script>
    var swiper = new Swiper('.swiper-container', {
      spaceBetween: 30,
      pagination: {
        el: '.swiper-pagination',
        clickable: true,
      },
    });
  </script>

This should be easy since I have already implemented Swiper on mobile.
 

4 More Discussions You Might Find Interesting

1. Solaris

init phase

Hello, Can somebody explain me the relationship between /sbin and /etc directories ? what is the relationship between them and what are the roles of files such as rcd.1 etc? (1 Reply)
Discussion started by: saudsos
1 Replies

2. What is on Your Mind?

Small bug in the Quick Editor function in postbit

Hey, There was a small bug in the Quick Editor function in postbit, but I fixed it (basically a double quote was missing from an element id): <div id="post_message_$post" class="neo-message-area">$post</div> Was <div id="post_message_$post class="neo-message-area">$post</div> Should... (1 Reply)
Discussion started by: Neo
1 Replies

3. Web Development

New Supplementary CSS for Forum Postbit

Working on moving inline style to a supplementary CSS file. This one is postbit.css: .pb-wrapper { border-style: solid; border-width: 1px; border-color: rgba(110, 117, 182, 0.99); padding: 0px 0px 0px 0px; } .pb-wrapper-b { padding: 0px; border-width: 0px 0px 1px... (0 Replies)
Discussion started by: Neo
0 Replies

4. Docker

Docker learning Phase-I

Hello All, I had recently learnt a bit of Docker(which provides containerization process). Here are some of my learning points from it. Let us start first with very basic question: What is Docker: Docker is a platform for sysadmins and developers to DEPLOY, DEVELOP and RUN applications ... (7 Replies)
Discussion started by: RavinderSingh13
7 Replies
All times are GMT -4. The time now is 09:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy