BBcode stop parsing in topic, works in another

Get help developing custom BBCodes or request one.
Post Reply
Zanzazaar
Registered User
Posts: 31
Joined: Fri Jan 15, 2016 2:14 pm

BBcode stop parsing in topic, works in another

Post by Zanzazaar » Sat May 19, 2018 5:34 pm

So, I start working on bbcode with content in tab, I had to check something so at the beginning I used something simple that I found in google.

Code: Select all

[akcept]{TEXT}[/akcept]

Code: Select all

<!-- Tab links -->
<div class="tab">
  <button class="tablinks" onclick="openCity(event, 'London')" id="defaultOpen">London</button>
  <button class="tablinks" onclick="openCity(event, 'Paris')">Paris</button>
  <button class="tablinks" onclick="openCity(event, 'Tokyo')">Tokyo</button>
</div>

<!-- Tab content -->
<div id="London" class="tabcontent">
  <h3>London</h3>
  <p>London is the capital city of England.</p>
</div>

<div id="Paris" class="tabcontent">
  <h3>Paris</h3>
  <p>Paris is the capital of France.</p>
</div>

<div id="Tokyo" class="tabcontent">
  <h3>Tokyo</h3>
  <p>Tokyo is the capital of Japan.</p>
</div> 

{TEXT}

<style>
 /* Style the tab */
.tab {
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
}

/* Style the buttons that are used to open the tab content */
.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
}

/* Change background color of buttons on hover */
.tab button:hover {
    background-color: #ddd;
}

/* Create an active/current tablink class */
.tab button.active {
    background-color: #ccc;
}

/* Style the tab content */
.tabcontent {
    display: none;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-top: none;
} 

.tabcontent {
    animation: fadeEffect 1s; /* Fading effect takes 1 second */
}

/* Go from zero to full opacity */
@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}
</style>

<script>
function openCity(evt, cityName) {
    // Declare all variables
    var i, tabcontent, tablinks;

    // Get all elements with class="tabcontent" and hide them
    tabcontent = document.getElementsByClassName("tabcontent");
    for (i = 0; i < tabcontent.length; i++) {
        tabcontent[i].style.display = "none";
    }

    // Get all elements with class="tablinks" and remove the class "active"
    tablinks = document.getElementsByClassName("tablinks");
    for (i = 0; i < tablinks.length; i++) {
        tablinks[i].className = tablinks[i].className.replace(" active", "");
    }

    // Show the current tab, and add an "active" class to the button that opened the tab
    document.getElementById(cityName).style.display = "block";
    evt.currentTarget.className += " active";
} 

// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();
</script>
Nothing special, I want to use other bbcodes as tabs in this but as for now I dont know if there is a point in that.
This bbcode works in one topic, and in other, when I edit post to check something, it stops working. I can delete bbcode from post and later add it again but it wont parse. I can add another post in any topic even in one that this bbcode still works but nothing. How it is possible that without change in bbcode phpbb3 wont parse it anymore?

User avatar
AbaddonOrmuz
Registered User
Posts: 389
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: BBcode stop parsing in topic, works in another

Post by AbaddonOrmuz » Sat May 19, 2018 5:51 pm

The post need to be reparsed, you can force it by editing the posts and adding a small change, for example adding or removing a space or a blank line.

You can also do it with on the command line, but you need SSH acces if it's on your server.
A proudly user of Arch Linux :: /r/sddm_themes

Zanzazaar
Registered User
Posts: 31
Joined: Fri Jan 15, 2016 2:14 pm

Re: BBcode stop parsing in topic, works in another

Post by Zanzazaar » Sat May 19, 2018 6:03 pm

Post itself is parsed. I can add text in bold. But my bbcode stop working. It does not work anymore in new posts.

User avatar
AbaddonOrmuz
Registered User
Posts: 389
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: BBcode stop parsing in topic, works in another

Post by AbaddonOrmuz » Sat May 19, 2018 6:36 pm

Then the problem is the BBCode itself, I'm not sure if the new engine supports <style> tags inside a BBCode.
A proudly user of Arch Linux :: /r/sddm_themes

Zanzazaar
Registered User
Posts: 31
Joined: Fri Jan 15, 2016 2:14 pm

Re: BBcode stop parsing in topic, works in another

Post by Zanzazaar » Sat May 19, 2018 6:58 pm

IT looks like the new engine is one big mistake. There is many things that were supported by previous versions that now arent. But what choice do we have, if they scare man, that older version could stop working if my hosting will upgrade...

So, I moves style to css file, as for now it helped. Thanks. I dont like it during contruction of bbcode, I like to use css in bbcode and later move it to file ;) It never before cause any problem.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20125
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: BBcode stop parsing in topic, works in another

Post by Mick » Sat May 19, 2018 7:24 pm

Things move on.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 2 guests