Jump to content

My Sharona

Clients
  • Posts

    576
  • Joined

  • Last visited

  • Days Won

    1

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by My Sharona

  1. With this last version (4.7.13) this issue has returned.

    I have discovered that it only happens when you use the "Publish" via the 'Moderation Actions' button at the top of said thread. If you go into the OP and adjust the date to a minute from whatever the current time is, it publishes and indeed does set the last read function.

    Additionally, I don't believe the aspect where the 'Moderation Actions' at the bottom of the thread, was ever updated to include the 'Publish' function.

     

    Thank you for your attention to this matter.

  2. 29 minutes ago, Marc Stridgen said:

    Please try again now

    Marc,

    It happened again... with a slight variation. I got the same page, "There are no applications available to upgrade." However, this time when I backed up to the ACP Home page and clicked the upgrade again, I then got the page that actually let me click to start the upgrade. 

    And then another problem was encountered... At some point during the upgrade, the spam captcha interrupted it and wanted me to place a dot at the end of the route. Really?? During an upgrade? Anyhoo.. I did that and it went to a screen that updated various javascripts.

    Could contain: Outdoors, Nature

    The whole process seems to have taken longer than previous upgrades.

    Again, I plead with you, please fix the reason why I have to back out and resubmit. It always causes unnecessary trepidation. I am very afraid to update my other site now...

     

  3. 1 minute ago, Marc Stridgen said:

    This one isnt you. We're aware of an issue at present, which we are looking into

    I don't understand...

    The others weren't me either. You expressed to me previously that you were aware of the issue and said it would be rectified. It obviously hasn't been.

  4. I'll honest... I literally hate upgrading.

    For as long as I can remember, since the monthly updates have begun, evey time I try and upgrade to the latest greatest, it is always a hassle. Not once has it gone smoothly. I generally get through the first two or three steps and then when the update is supposed to be applied, I usually get a screen telling me that it can't for whatever reason or it simply freezes. When this happens, I am generally able to back out of it and submit a second time and the install actually happens. I have expressed this problem to management previously and was told that it would be rectified.

    Today was a new one. I get through the first few screens and it gets ready to install the update and I get a screen that says, "There are no applications available to upgrade." As I stated, I can usually back out to the previous screen and resubmit. Today, that is not letting me do so. I back out all the way to the home screen in the ACP and then go back to, Site Features > Applications and click, Update Available, and it brings me directly back to that screen, "There are no applications available to upgrade." If I click the "Exit Upgrader" button, it takes me to the default page of my site.

    So I am stuck. I can't finish the upgrade. I guess I need some administrative help on the backend to once again finish the update for me.

    This is a major reason why I hate monthly updates, they never go smoothly. It would be greatly appreciated if this problem that seems to persist, and has for years, could be fixed. And fixed once and for all. 

    The screen:

    Could contain: File, Webpage, Text

  5. 23 hours ago, Nathan Explosion said:

    X tables in one block (X = 1 or more...just edit the 'tableIds' array to put the IDs in place)

    <table id="table1">
        <thead>
        <tr>
            <th>Item</th>
            <th>Variable 1</th>
            <th>Variable 2</th>
            <th>Variable 3</th>
            <th>Variable 4</th>
            <th>Variable 5</th>
            <th>Variable 6</th>
            <th>Total</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>Item 1</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td></td>
        </tr>
        <tr>
            <td>Item 2</td>
            <td>0</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td></td>
        </tr>
        <tr>
            <td>Item 3</td>
            <td>0</td>
            <td>0</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td></td>
        </tr>
        <tr>
            <td>Item 4</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
            <td></td>
        </tr>
        <tr>
            <td>Item 5</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>1</td>
            <td>0</td>
            <td></td>
        </tr>
        </tbody>
    </table>
    <table id="table2">
        <thead>
        <tr>
            <th>Item</th>
            <th>Variable 1</th>
            <th>Variable 2</th>
            <th>Variable 3</th>
            <th>Variable 4</th>
            <th>Variable 5</th>
            <th>Variable 6</th>
            <th>Total</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>Item 1</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td></td>
        </tr>
        <tr>
            <td>Item 2</td>
            <td>0</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td></td>
        </tr>
        <tr>
            <td>Item 3</td>
            <td>0</td>
            <td>0</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td></td>
        </tr>
        <tr>
            <td>Item 4</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
            <td></td>
        </tr>
        <tr>
            <td>Item 5</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>1</td>
            <td>0</td>
            <td></td>
        </tr>
        </tbody>
    </table>
    <script>
    const tableIds = ['#table1','#table2'];
        let table, rows, rowTotalCell, cells, total, totalCell;
        tableIds.forEach(myTable => {
            table = document.querySelector(myTable);
            if(table !== null){
                rows = table.querySelectorAll('tbody tr');
                rowTotalCell = document.getElementById('rowTotal');
                rows.forEach(row => {
                    cells = row.querySelectorAll('td');
                    total = 0;
                    cells.forEach((cell, index) => {
                        if (index > 0 && index < cells.length - 1) {
                            total += parseFloat(cell.textContent);
                        }
                    });
                    totalCell = row.querySelector('td:last-child');
                    totalCell.textContent = total.toFixed(0);
                });
            }
        });
    </script>

     

    Fantastic. Good to know should that need arise. thumb.gif.38f646b29f7ddb5f04a72d35d17ce249.gif

  6. 23 hours ago, Nathan Explosion said:

    That makes me twitch.

    Change it to:

    if (index > 0 && index < cells.length - 1) {
    	total += parseFloat(cell.textContent);
    }

     

    Thank you, sir. Works like a charm.

    Just a FYI here... In fooling around, I have noticed that if you add another block (say you wanted two of these on the same page) the second block on the page won't do the adding of the columns in rows. I tried leaving the 'table id' the same (in both places, within a block) and also changing the 'table id' of the second block, but neither works.

  7. 1 hour ago, Nathan Explosion said:

    Show your modified code...

    <table id="natestable">
    	<thead>
    	<tr>
    		<th>Item</th>
    		<th>Variable 1</th>
    		<th>Variable 2</th>
    		<th>Variable 3</th>
    		<th>Variable 4</th>
    		<th>Variable 5</th>
    		<th>Variable 6</th>
    		<th>Total</th>
    	</tr>
    	</thead>
    	<tbody>
    	<tr>
    		<td>Item 1</td>
    		<td>1</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td></td>
    	</tr>
    	<tr>
    		<td>Item 2</td>
    		<td>0</td>
    		<td>1</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td></td>
    	</tr>
    	<tr>
    		<td>Item 3</td>
    		<td>0</td>
    		<td>0</td>
    		<td>1</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td></td>
    	</tr>
    	<tr>
    		<td>Item 4</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td>1</td>
    		<td>0</td>
    		<td>0</td>
    		<td></td>
    	</tr>
    	<tr>
    		<td>Item 5</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td>0</td>
    		<td>1</td>
    		<td>0</td>
    		<td></td>
    	</tr>
    	</tbody>
    </table>
    <script>
     const table = document.querySelector('#natestable');
        const rows = table.querySelectorAll('tbody tr');
        const rowTotalCell = document.getElementById('rowTotal');
        rows.forEach(row => {
            const cells = row.querySelectorAll('td');
            let total = 0;
            cells.forEach((cell, index) => {
                if (index === 1 || index === 2 || index === 3 || index === 4 || index === 5 || index === 6) {
                    total += parseFloat(cell.textContent);
                }
            });
            const totalCell = row.querySelector('td:last-child');
            totalCell.textContent = total.toFixed(0);
        });
    </script>

    Hope I did all that right.

     

    1 hour ago, Nathan Explosion said:

    And maybe look at what the JS function toFixed() does, as that may give you a clue at to what that 2 is for.

    Yep, I believe that fixed it. thumb.gif.9552e86ffa1560b9f31c1d7f51bee557.gif

  8. On 8/17/2023 at 6:25 AM, Nathan Explosion said:

    Page Builder: Text

    Literally a copy/paste of the relevant code, with a slight modification to how the table is selected in the Javascript code. Free free to add your style to it.

     

    <table id="thisismytable">
    	<thead>
    	<tr>
    		<th>Identifier/Product</th>
    		<th>Column 1</th>
    		<th>Column 2</th>
    		<th>Total</th>
    	</tr>
    	</thead>
    	<tbody>
    	<tr>
    		<td>Item 1</td>
    		<td>17</td>
    		<td>24</td>
    		<td></td>
    	</tr>
    	<tr>
    		<td>Item 2</td>
    		<td>13</td>
    		<td>2</td>
    		<td></td>
    	</tr>
    	</tbody>
    </table>
    <script>
     const table = document.querySelector('#thisismytable');
        const rows = table.querySelectorAll('tbody tr');
        const rowTotalCell = document.getElementById('rowTotal');
        rows.forEach(row => {
            const cells = row.querySelectorAll('td');
            let total = 0;
            cells.forEach((cell, index) => {
                if (index === 1 || index === 2) {
                    total += parseFloat(cell.textContent);
                }
            });
            const totalCell = row.querySelector('td:last-child');
            totalCell.textContent = total.toFixed(2);
        });
    </script>

     

     

     

     

    This seems to work just fine. Thank you again Nathan, greatly appreciated.

    If I may ask one more... I have played around with it a bit and figured out how to add more columns and data to the rows and have them add to the total. However, the totals give decimal places ("x.000..." (one for each column it seems)). Is there a way to remove the decimals?

    Thanks!

  9. 22 hours ago, Nathan Explosion said:

    Page Builder: Text

    Literally a copy/paste of the relevant code, with a slight modification to how the table is selected in the Javascript code. Free free to add your style to it.

     

    <table id="thisismytable">
    	<thead>
    	<tr>
    		<th>Identifier/Product</th>
    		<th>Column 1</th>
    		<th>Column 2</th>
    		<th>Total</th>
    	</tr>
    	</thead>
    	<tbody>
    	<tr>
    		<td>Item 1</td>
    		<td>17</td>
    		<td>24</td>
    		<td></td>
    	</tr>
    	<tr>
    		<td>Item 2</td>
    		<td>13</td>
    		<td>2</td>
    		<td></td>
    	</tr>
    	</tbody>
    </table>
    <script>
     const table = document.querySelector('#thisismytable');
        const rows = table.querySelectorAll('tbody tr');
        const rowTotalCell = document.getElementById('rowTotal');
        rows.forEach(row => {
            const cells = row.querySelectorAll('td');
            let total = 0;
            cells.forEach((cell, index) => {
                if (index === 1 || index === 2) {
                    total += parseFloat(cell.textContent);
                }
            });
            const totalCell = row.querySelector('td:last-child');
            totalCell.textContent = total.toFixed(2);
        });
    </script>

     

     

     

     

    Thank you for this, I will give it a try over the weekend.

     

    22 hours ago, opentype said:

    A Pages block doesn’t take a full HTML page and it should have a better identifier than just “table”. Nathan’s code fixes those things. 

    But how is the data fed into the table anyway? If it takes hard-coded data in the block, I wouldn’t want to use JavaScript on the visitor’s site to make those calculations. 

    The data is entered manually. I was hoping to avoid the step of having to add the columns within the row, for each row.

     

     

  10. 12 hours ago, Nathan Explosion said:

    OK - so what actually happens when you try?

    That code works as expected as HTML page - so how have you taken that code and implemented it? What happens when you try?

    This is what renders on a Page in a Page builder: Text Block or utilizing the Source of a WYSIWYG Editor block:
    Could contain: Text, Page
    As you can see, it doesn't total.
     

    12 hours ago, Nathan Explosion said:

    Or are you looking for someone to convert that for you?

    I was just hoping to get some help here as to why it doesn't work in the IPS environment. If I can't get it figured out, I guess I will just have to do it manually. I figure it has to be something simple.

     

    12 hours ago, Nathan Explosion said:

    And isn't a "Text block" just that - a block for adding simple text to a page? Does it allow HTML/Javascript?

    Yes, it allows html/java. I use it for a number of blocks just fine.

    Thanks.

  11. 7 hours ago, Nathan Explosion said:

    A SQL table?

    A Pages database table?

    A form helper table?

    What is the code?

    Gotcha. Know I know what @Miss_B meant, thanks.

    I am trying to add it to a Page Builder: Text Block

    Chat GPT gives me html with some Java

    <!DOCTYPE html>
    <html>
    <head>
        <title>simple code for row sums</title>
        <style>
            table {
                border-collapse: collapse;
                width: 50%;
                margin: auto;
            }
            th, td {
                border: 1px solid black;
                padding: 8px;
                text-align: center;
            }
        </style>
    </head>
    <body>
    
    <table>
        <thead>
            <tr>
                <th>Identifier/Product</th>
                <th>Column 1</th>
                <th>Column 2</th>
                <th>Total</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Item 1</td>
                <td>17</td>
                <td>24</td>
                <td></td>
            </tr>
            <tr>
                <td>Item 2</td>
                <td>13</td>
                <td>2</td>
                <td></td>
            </tr>
        </tbody>
    </table>
    
    <script>
        const table = document.querySelector('table');
        const rows = table.querySelectorAll('tbody tr');
        const rowTotalCell = document.getElementById('rowTotal');
        
        rows.forEach(row => {
            const cells = row.querySelectorAll('td');
            let total = 0;
            
            cells.forEach((cell, index) => {
                if (index === 1 || index === 2) {
                    total += parseFloat(cell.textContent);
                }
            });
            
            const totalCell = row.querySelector('td:last-child');
            totalCell.textContent = total.toFixed(2);
        });
    </script>
    
    </body>
    </html>

     

  12. 13 hours ago, Miss_B said:

    Can you please provide more details? The more the better.

    I have a table, and I am adding numbers to each row via columns. I need the row to add the numbers at the end of the column and display the sum total of all numbers in that row. It needs to work much like a spreadsheet in Excel or Open Office.

    Code I have that works in other environments, won't work in the IPS environment.

    Thanks.

  13. 6 hours ago, Sly_Ripper said:

    Twitter has discontinued this

    Not true.

     

    Twitter is currently allowing Profile embeds. List embeds are not working as yet but it is likely that it is just a metter of time before they begin working again.

×
×
  • Create New...