javascript – VueJS: Order of Items in a List Changing after Click

I’m using VueJS/Nuxt and facing a peculiar problem.

The list contains a few items and each list item is clickable. When I click an item, it takes me to a new page containing data for that item. But when I return back to the main page, the order of items is shuffled with the most recently clicked item appearing on the top. I’m unable to figure it out. Below is my setup.

There is a list containing a few items.

let myList = ({id:1, name:'A'},{id:2, name:'B'},{id:3, name:'C'}) 

On my page /mainpage, I’m using a div to display this list.

<div v-for="item in myList" :key="item.id">
 <div @click="doSomething(item)">{{item.name}}</div>
</div>

Within the doSomething() method, I make some state changes and then change the route as follows:

// Method
doSomething (item) {
  await this.$store.dispatch('setActiveItem', item)
  this.$router.push(`/new/${item.id}`)
}

Clicking the item takes the user to this new page /new/{id}

On this page, there is a button to bring us back to the main page. The button has the following method.

//method
previousPage () {
  this.$router.push('/mainpage')
},

The problem is that when I return to the main page, the most recently clicked item appears on the top. The order of items has changed! I am just not able to figure out why this is happening. Please help.

linux – Prevent URL changing after CNAME


Description
I encountered the problem, that with a CNAME redirect the URL shown in the browser changes to the CNAME URL. If you redirect via A-Record the IP gets changed to the URL which was entered, so basicly the URL doesn’t change here. I don’t know if this problem is created from my provider or from the DNS in general.


What I want to archive:
Let the entered URL stay in the browser input

Why do I want to archive this:
The IP of the server could change, but the given URL of the CNAME wont change. Its somehow a DDNS. I want it to work like an A-Record but with a CNAME-Record


What I discovered:

  • A Record:
    • Entered URL stays
    • IP gets removed
  • CNAME:
    • Entered URL gets removed
    • CNAME-URL stays

Setup:

  • Provider: Nitrado
  • Ubuntu 20.04
  • nginx (webspace)

What I tried:

  • Setting up own DNS (bind9)(I couldnt archive to get that working)
  • HTTP-Frame: List the website as “iframe” (Looks good on first place, but has problems as well)
  • Researched about rewriting URL (Topics: .htaccess, nginx, PHP, JS)

Else:
I tried to order this question as good as posible for future sys-admins. If you think I made something wrong please just tell me and I will correct it.

Changing drag and drop behaviour in Thunderbird

Are there any Settings for changing Thunderbirds Drag&Drop behaviour in general or more specific when you drop the mail over in a folder e.g. via Windows Explorer (if you do that it will save the Emails as a eml-file, the file name will be the subject).

Except for a few Addons I couldn’t find anything that can be accessed via the settings and/or the config file.

postgresql – Avoid duplicate WHERE clause on both sides of a LEFT JOIN, without changing semantics or impairing query optimization

I have a table recording the results of a web crawl. (Table
definition at the end of this question.) The relevant part of the data
stored in it looks like this:

 experiment_id | url_id | redirect_num | full_url_id | has_blockpage_regex | blockpage_reason_id
---------------+--------+--------------+-------------+---------------------+---------------------
            16 |   1312 |            0 |        1312 |                   f |
            16 |   1312 |            1 |        2311 |                   f |
            16 |   1312 |            2 |        2312 |                   f |
            16 |   1312 |            3 |        2313 |                   f |
            43 |   1320 |            0 |        1320 |                   f |
            43 |   1320 |            2 |        2312 |                   f |
            43 |   1320 |            1 |        2317 |                   t |                   1
            43 |   1320 |            3 |        2318 |                   f |

For each (experiment_id, url_id) pair, from a small set of experiment IDs, I want to query the full_url_id associated with the largest value of redirect_num, and the blockpage_reason_id associated with the smallest value of redirect_num for which has_blockpage_regex is true. (If there is no row satisfying the latter condition, blockpage_reason_id should come out null.) For the data above, the desired results would be like this:

 experiment_id | url_id | full_url_id | blockpage_reason_id
---------------+--------+-------------+---------------------
            16 |   1312 |        2313 |
            43 |   1320 |        2318 |                   1

I have a query that does what I want, but it’s extremely slow, involving multiple full table scans.
(EXPLAIN ANALYZE dump also at the end of the question.)

select x.experiment_id, x.url_id, x.full_url_id, y.blockpage_reason_id from (
  select bm.experiment_id, bm.url_id, b.full_url_id
    from blockpage b
    join (select experiment_id, url_id, max(redirect_num) as redirect_num
            from blockpage
           group by experiment_id, url_id) bm
      on b.experiment_id = bm.experiment_id
     and b.url_id = bm.url_id
     and b.redirect_num = bm.redirect_num
) x left join (
  select bm.experiment_id, bm.url_id,
         b.has_blockpage_regex, b.blockpage_reason_id
    from blockpage b
    join (select experiment_id, url_id, max(redirect_num) as redirect_num
            from blockpage
           where has_blockpage_regex
           group by experiment_id, url_id) bm
      on b.experiment_id = bm.experiment_id
     and b.url_id = bm.url_id
     and b.redirect_num = bm.redirect_num
) y on x.experiment_id = y.experiment_id
   and x.url_id = y.url_id
 where x.experiment_id in (16,43);

I can make it work efficiently by duplicating the WHERE clause at the very end into the subselects on both sides of the LEFT JOIN:

select x.experiment_id, x.url_id, x.full_url_id, y.blockpage_reason_id from (
  select bm.experiment_id, bm.url_id, b.full_url_id
    from blockpage b
    join (select experiment_id, url_id, max(redirect_num) as redirect_num
            from blockpage
           group by experiment_id, url_id) bm
      on b.experiment_id = bm.experiment_id
     and b.url_id = bm.url_id
     and b.redirect_num = bm.redirect_num
   where bm.experiment_id in (16,43)         -- DUPLICATED
) x left join (
  select bm.experiment_id, bm.url_id,
         b.has_blockpage_regex, b.blockpage_reason_id
    from blockpage b
    join (select experiment_id, url_id, max(redirect_num) as redirect_num
            from blockpage
           where has_blockpage_regex
           group by experiment_id, url_id) bm
      on b.experiment_id = bm.experiment_id
     and b.url_id = bm.url_id
     and b.redirect_num = bm.redirect_num
   where bm.experiment_id in (16,43)         -- DUPLICATED
) y on x.experiment_id = y.experiment_id
   and x.url_id = y.url_id;

But this will not work in practice, because the query (without the WHERE) is going to be used as a view definition, and people will select with WHEREs from the view, which is equivalent to applying a single WHERE to the outermost SELECT.

So my question is, how do I rewrite this query so that WHEREs on the outermost SELECT will be executed as efficiently as they are if I push them inside the LEFT JOIN manually? Change it as much as you want, as long as it still produces the same results as the example at the top.

Database is Postgres 12.2.


EXPLAIN ANALYZE for the original query:

 Nested Loop Left Join  (cost=1315730.90..3856617.09 rows=20 width=16) (actual time=36112.365..55406.053 rows=501 loops=1)
   Output: blockpage.experiment_id, blockpage.url_id, b.full_url_id, b_1.blockpage_reason_id
   Join Filter: ((blockpage.experiment_id = blockpage_1.experiment_id) AND (blockpage.url_id = blockpage_1.url_id))
   Rows Removed by Join Filter: 220714047
   ->  Nested Loop  (cost=1.14..88505.96 rows=20 width=12) (actual time=466.302..480.840 rows=501 loops=1)
         Output: b.full_url_id, blockpage.experiment_id, blockpage.url_id
         ->  GroupAggregate  (cost=0.57..15442.73 rows=8543 width=12) (actual time=466.267..470.146 rows=501 loops=1)
               Output: blockpage.experiment_id, blockpage.url_id, max(blockpage.redirect_num)
               Group Key: blockpage.experiment_id, blockpage.url_id
               ->  Index Only Scan using blockpage_experiment_id_url_id_redirect_num_blockpage_reason__ on iclab.blockpage  (cost=0.57..15293.19 rows=8547 width=12) (actual time=0.048..1.662 rows=803 loops=1)
                     Output: blockpage.experiment_id, blockpage.url_id, blockpage.full_url_id, blockpage.redirect_num, blockpage.html_tag_id
                     Index Cond: (blockpage.experiment_id = ANY ('{16,43}'::integer()))
                     Heap Fetches: 803
         ->  Index Only Scan using blockpage_experiment_id_url_id_redirect_num_blockpage_reason__ on iclab.blockpage b  (cost=0.57..8.53 rows=1 width=16) (actual time=0.016..0.018 rows=1 loops=501)
               Output: b.experiment_id, b.url_id, b.full_url_id, b.redirect_num, b.html_tag_id
               Index Cond: ((b.experiment_id = blockpage.experiment_id) AND (b.url_id = blockpage.url_id) AND (b.redirect_num = (max(blockpage.redirect_num))))
               Heap Fetches: 501
   ->  Materialize  (cost=1315729.77..3767691.70 rows=1207 width=12) (actual time=7.067..89.428 rows=440547 loops=501)
         Output: b_1.blockpage_reason_id, blockpage_1.experiment_id, blockpage_1.url_id
         ->  Hash Join  (cost=1315729.77..3767685.66 rows=1207 width=12) (actual time=3540.653..35478.463 rows=440547 loops=1)
               Output: b_1.blockpage_reason_id, blockpage_1.experiment_id, blockpage_1.url_id
               Inner Unique: true
               Hash Cond: ((b_1.experiment_id = blockpage_1.experiment_id) AND (b_1.url_id = blockpage_1.url_id) AND (b_1.redirect_num = (max(blockpage_1.redirect_num))))
               ->  Seq Scan on iclab.blockpage b_1  (cost=0.00..1757677.88 rows=88162288 width=16) (actual time=0.012..9535.931 rows=88164599 loops=1)
                     Output: b_1.id, b_1.url_id, b_1.full_url_id, b_1.experiment_id, b_1.blockpage_reason_id, b_1.html_tag_id, b_1.body_len, b_1.blockpage_diff, b_1.has_blockpage_regex, b_1.http_status, b_1.redirect_num, b_1.response_failure
               ->  Hash  (cost=1306621.31..1306621.31 rows=520483 width=12) (actual time=3538.005..3538.005 rows=440547 loops=1)
                     Output: blockpage_1.experiment_id, blockpage_1.url_id, (max(blockpage_1.redirect_num))
                     Buckets: 524288  Batches: 1  Memory Usage: 23026kB
                     ->  Finalize HashAggregate  (cost=1296211.65..1301416.48 rows=520483 width=12) (actual time=3325.126..3427.920 rows=440547 loops=1)
                           Output: blockpage_1.experiment_id, blockpage_1.url_id, max(blockpage_1.redirect_num)
                           Group Key: blockpage_1.experiment_id, blockpage_1.url_id
                           ->  Gather  (cost=1246069.28..1292868.83 rows=445710 width=12) (actual time=3029.657..3143.505 rows=441870 loops=1)
                                 Output: blockpage_1.experiment_id, blockpage_1.url_id, (PARTIAL max(blockpage_1.redirect_num))
                                 Workers Planned: 2
                                 Workers Launched: 2
                                 JIT for worker 0:
                                   Functions: 9
                                   Options: Inlining true, Optimization true, Expressions true, Deforming true
                                   Timing: Generation 1.136 ms, Inlining 51.049 ms, Optimization 73.089 ms, Emission 39.722 ms, Total 164.995 ms
                                 JIT for worker 1:
                                   Functions: 9
                                   Options: Inlining true, Optimization true, Expressions true, Deforming true
                                   Timing: Generation 2.075 ms, Inlining 72.675 ms, Optimization 70.854 ms, Emission 39.490 ms, Total 185.093 ms
                                 ->  Partial HashAggregate  (cost=1245069.28..1247297.83 rows=222855 width=12) (actual time=3004.908..3047.674 rows=147290 loops=3)
                                       Output: blockpage_1.experiment_id, blockpage_1.url_id, PARTIAL max(blockpage_1.redirect_num)
                                       Group Key: blockpage_1.experiment_id, blockpage_1.url_id
                                       Worker 0: actual time=2999.661..3042.358 rows=137916 loops=1
                                       Worker 1: actual time=2985.698..3026.195 rows=144767 loops=1
                                       ->  Parallel Seq Scan on iclab.blockpage blockpage_1  (cost=0.00..1243397.87 rows=222855 width=12) (actual time=115.822..2924.688 rows=177783 loops=3)
                                             Output: blockpage_1.id, blockpage_1.url_id, blockpage_1.full_url_id, blockpage_1.experiment_id, blockpage_1.blockpage_reason_id, blockpage_1.html_tag_id, blockpage_1.body_len, blockpage_1.blockpage_diff, blockpage_1.has_blockpage_regex, blockpage_1.http_status, blockpage_1.redirect_num, blockpage_1.response_failure
                                             Filter: blockpage_1.has_blockpage_regex
                                             Rows Removed by Filter: 29210417
                                             Worker 0: actual time=164.165..2922.106 rows=165851 loops=1
                                             Worker 1: actual time=183.286..2912.232 rows=173763 loops=1
 Planning Time: 1.013 ms
 JIT:
   Functions: 60
   Options: Inlining true, Optimization true, Expressions true, Deforming true
   Timing: Generation 11.387 ms, Inlining 132.486 ms, Optimization 415.860 ms, Emission 264.166 ms, Total 823.898 ms
 Execution Time: 55458.769 ms

EXPLAIN ANALYZE for the query with duplicate WHEREs:

 Merge Left Join  (cost=2.27..104247.90 rows=20 width=16) (actual time=40.938..44.044 rows=501 loops=1)
   Output: blockpage.experiment_id, blockpage.url_id, b.full_url_id, b_1.blockpage_reason_id
   Merge Cond: ((blockpage.experiment_id = blockpage_1.experiment_id) AND (blockpage.url_id = blockpage_1.url_id))
   ->  Nested Loop  (cost=1.14..88505.96 rows=20 width=12) (actual time=40.603..43.615 rows=501 loops=1)
         Output: b.full_url_id, blockpage.experiment_id, blockpage.url_id
         ->  GroupAggregate  (cost=0.57..15442.73 rows=8543 width=12) (actual time=40.561..41.298 rows=501 loops=1)
               Output: blockpage.experiment_id, blockpage.url_id, max(blockpage.redirect_num)
               Group Key: blockpage.experiment_id, blockpage.url_id
               ->  Index Only Scan using blockpage_experiment_id_url_id_redirect_num_blockpage_reason__ on iclab.blockpage  (cost=0.57..15293.19 rows=8547 width=12) (actual time=0.045..0.432 rows=803 loops=1)
                     Output: blockpage.experiment_id, blockpage.url_id, blockpage.full_url_id, blockpage.redirect_num, blockpage.html_tag_id
                     Index Cond: (blockpage.experiment_id = ANY ('{16,43}'::integer()))
                     Heap Fetches: 803
         ->  Index Only Scan using blockpage_experiment_id_url_id_redirect_num_blockpage_reason__ on iclab.blockpage b  (cost=0.57..8.53 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=501)
               Output: b.experiment_id, b.url_id, b.full_url_id, b.redirect_num, b.html_tag_id
               Index Cond: ((b.experiment_id = blockpage.experiment_id) AND (b.url_id = blockpage.url_id) AND (b.redirect_num = (max(blockpage.redirect_num))))
               Heap Fetches: 501
   ->  Materialize  (cost=1.14..15741.83 rows=1 width=12) (actual time=0.329..0.329 rows=0 loops=1)
         Output: b_1.blockpage_reason_id, blockpage_1.experiment_id, blockpage_1.url_id
         ->  Nested Loop  (cost=1.14..15741.82 rows=1 width=12) (actual time=0.326..0.326 rows=0 loops=1)
               Output: b_1.blockpage_reason_id, blockpage_1.experiment_id, blockpage_1.url_id
               ->  GroupAggregate  (cost=0.57..15294.10 rows=52 width=12) (actual time=0.325..0.325 rows=0 loops=1)
                     Output: blockpage_1.experiment_id, blockpage_1.url_id, max(blockpage_1.redirect_num)
                     Group Key: blockpage_1.experiment_id, blockpage_1.url_id
                     ->  Index Scan using blockpage_experiment_id_url_id_redirect_num_blockpage_reason__ on iclab.blockpage blockpage_1  (cost=0.57..15293.19 rows=52 width=12) (actual time=0.324..0.325 rows=0 loops=1)
                           Output: blockpage_1.id, blockpage_1.url_id, blockpage_1.full_url_id, blockpage_1.experiment_id, blockpage_1.blockpage_reason_id, blockpage_1.html_tag_id, blockpage_1.body_len, blockpage_1.blockpage_diff, blockpage_1.has_blockpage_regex, blockpage_1.http_status, blockpage_1.redirect_num, blockpage_1.response_failure
                           Index Cond: (blockpage_1.experiment_id = ANY ('{16,43}'::integer()))
                           Filter: blockpage_1.has_blockpage_regex
                           Rows Removed by Filter: 803
               ->  Index Scan using blockpage_experiment_id_url_id_redirect_num_blockpage_reason__ on iclab.blockpage b_1  (cost=0.57..8.59 rows=1 width=16) (never executed)
                     Output: b_1.id, b_1.url_id, b_1.full_url_id, b_1.experiment_id, b_1.blockpage_reason_id, b_1.html_tag_id, b_1.body_len, b_1.blockpage_diff, b_1.has_blockpage_regex, b_1.http_status, b_1.redirect_num, b_1.response_failure
                     Index Cond: ((b_1.experiment_id = blockpage_1.experiment_id) AND (b_1.url_id = blockpage_1.url_id) AND (b_1.redirect_num = (max(blockpage_1.redirect_num))))
 Planning Time: 1.004 ms
 JIT:
   Functions: 33
   Options: Inlining false, Optimization false, Expressions true, Deforming true
   Timing: Generation 6.438 ms, Inlining 0.000 ms, Optimization 1.856 ms, Emission 38.146 ms, Total 46.440 ms
 Execution Time: 50.745 ms

Table definition:

CREATE TABLE iclab.blockpage (
    id                          BIGSERIAL   PRIMARY KEY,
    url_id                      INTEGER     NOT NULL,
    full_url_id                 INTEGER     NOT NULL,
    experiment_id               INTEGER     NOT NULL,
    blockpage_reason_id         INTEGER,
    html_tag_id                 INTEGER     NOT NULL,
    body_len                    INTEGER,
    blockpage_diff              REAL,
    has_blockpage_regex         BOOLEAN,
    http_status                 INTEGER,
    redirect_num                INTEGER     NOT NULL,
    response_failure            INTEGER,
    FOREIGN KEY (experiment_id)         REFERENCES iclab.experiment_results(id),
    FOREIGN KEY(url_id)                 REFERENCES iclab.URL(id),
    FOREIGN KEY(url_id)                 REFERENCES iclab.URL(id),
    FOREIGN KEY(blockpage_reason_id)    REFERENCES iclab.blockpage_reason(id),
    FOREIGN KEY(html_tag_id)            REFERENCES iclab.html_tag(id)
);

CREATE UNIQUE INDEX blockpage_experiment_id_url_id_redirect_num_blockpage_reason__
    ON iclab.blockpage(experiment_id , url_id, full_url_id, redirect_num, html_tag_id);

air travel – TAP Air Portugal changing flight for free is not possible

I booked a flight from Vienna to Lisbon on the 2nd of July, with flight date of 7th of September.
It is a Classic ticket, so basically it permits flight changes with a fee: (75€) + difference.

However in July TAP started a new campaign, as the first change is free for everyone: https://www.flytap.com/en-hu/promo/book-with-confidence now they extended this campaign until 31st of August. This was the reason why I bought my ticket, but now things happened and I need to change my flight date from 07th to 17th of September.

Prices are the same, so I think it should be free to change, but their system says I need to pay 75€. I read all their conditions and I am 100%s sure that I should be eligible for a free change.
Also tried to connect customer support in messenger, telephone, even I filled a complaint on their website, but haven’t received any answer after 2weeks of waiting.
Obviously I don’t want to pay 75€ (from this money I could even buy a new ticket), but I don’t know what else options do I have. Cancellation is not possible, I mean I would not get any compensation. (I hope they will cancel it and then I could get a voucher at least.)
What should I do in this situation?
Also, I don’t understand why are they advertising things which are not true?

list manipulation – How can I use Part Assignment to change sublists into other sublists (without changing levels)?

Here’s a 5×5 grid. Using predefined starting points, I’d like to change some sublists into something else (e.g., the values for a color, “drawing an opaque box”).

list = 
{{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}}};

This seems simple enough, use the Part command to change all of the elements via:

Part({list}, startingrow;;endingrow, startingelement;;endingelement) = assignment;

(Now use the new list for whatever you like)

This works totally as expected if your list is just a bunch of integers.
Trying the one above…

list = 
{{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}}};
color1 = {0.529`, 0.808`, 0.922`};
row = 3;
start = 2;
Part(list, row - 1 ;; row + 1, start ;; start + 2) = color1;
list
(* Output:
{{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, 0.529, 0.529, 0.529, {1, 1, 1}},
{{1, 1, 1}, 0.808, 0.808, 0.808, {1, 1, 1}},
{{1, 1, 1}, 0.922, 0.922, 0.922, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}}}
*)

Not good! The Part function replaced the sublists with each element of the new sublist.
Putting the new sublist into a lower level almost works:

Part(list, row - 1 ;; row + 1, start ;; start + 2) = {color1};
list
(* Output:
{{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {{0.529, 0.808, 0.922}}, {{0.529, 0.808, 0.922}}, {{0.529, 0.808, 0.922}}, {1, 1, 1}},
{{1, 1, 1}, {{0.529, 0.808, 0.922}}, {{0.529, 0.808, 0.922}}, {{0.529, 0.808, 0.922}}, {1, 1, 1}},
{{1, 1, 1}, {{0.529, 0.808, 0.922}}, {{0.529, 0.808, 0.922}}, {{0.529, 0.808, 0.922}}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}}}
*)

But now all the new sublists are a level too far down. Both Flatten with 2 arguments and FlattenAt don’t appear to be able to rid specifically only these levels.

Is there a convenient way to get the desired output? (Shown Below)

{{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{1, 1, 1}, {0.529, 0.808, 0.922}, {0.529, 0.808, 0.922}, {0.529, 0.808, 0.922}, {1, 1, 1}},
{{1, 1, 1}, {0.529, 0.808, 0.922}, {0.529, 0.808, 0.922}, {0.529, 0.808, 0.922}, {1, 1, 1}},
{{1, 1, 1}, {0.529, 0.808, 0.922}, {0.529, 0.808, 0.922}, {0.529, 0.808, 0.922}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}}}

configuration – Changing the Title of a Blog

How can I change the title of my blog? It’s found on the main page of the blog above the previews of the posts. I am attaching a screen shot.

I want to change “The Scrapbooked Bible Study” (on the left above the first blog post preview) to “Winning the Victory.” Thank you.

enter image description here

customization – Changing the CSS with a plugin

I’m trying to make a plugin that changes the CSS file. My client want to change the colors each season, and we want to make it foolproof so they won’t break anything.

I’ve managed to create the option page but I can’t seem to get the actual function to work.

<?php
class SeizoensKleuren {
    private $seizoens_kleuren_options;

    public function __construct() {
        add_action( 'admin_menu', array( $this, 'seizoens_kleuren_add_plugin_page' ) );
        add_action( 'admin_init', array( $this, 'seizoens_kleuren_page_init' ) );
    }

    public function seizoens_kleuren_add_plugin_page() {
        add_menu_page(
            'Seizoens kleuren', // page_title
            'Seizoens kleuren', // menu_title
            'manage_options', // capability
            'seizoens-kleuren', // menu_slug
            array( $this, 'seizoens_kleuren_create_admin_page' ), // function
            'dashicons-admin-appearance', // icon_url
            81 // position
        );
    }

    public function seizoens_kleuren_create_admin_page() {
        $this->seizoens_kleuren_options = get_option( 'seizoens_kleuren_option_name' ); ?>

        <div class="wrap">
            <h2>Seizoens kleuren</h2>
            <p>Verander hier de kleuren van de site n.a.v. het seizoen!</p>
            <?php settings_errors(); ?>

            <form method="post" action="options.php">
                <?php
                    settings_fields( 'seizoens_kleuren_option_group' );
                    do_settings_sections( 'seizoens-kleuren-admin' );
                    submit_button();
                ?>
            </form>
        </div>
    <?php }

    public function seizoens_kleuren_page_init() {
        register_setting(
            'seizoens_kleuren_option_group', // option_group
            'seizoens_kleuren_option_name', // option_name
            array( $this, 'seizoens_kleuren_sanitize' ) // sanitize_callback
        );

        add_settings_section(
            'seizoens_kleuren_setting_section', // id
            'Settings', // title
            array( $this, 'seizoens_kleuren_section_info' ), // callback
            'seizoens-kleuren-admin' // page
        );

        add_settings_field(
            'seizoen_0', // id
            'Seizoen:', // title
            array( $this, 'seizoen_0_callback' ), // callback
            'seizoens-kleuren-admin', // page
            'seizoens_kleuren_setting_section' // section
        );
    }

    public function seizoens_kleuren_sanitize($input) {
        $sanitary_values = array();
        if ( isset( $input('seizoen_0') ) ) {
            $sanitary_values('seizoen_0') = $input('seizoen_0');
        }

        return $sanitary_values;
    }

    public function seizoens_kleuren_section_info() {
        
    }

    public function seizoen_0_callback() {
        ?> <select name="seizoens_kleuren_option_name(seizoen_0)" id="seizoen_0">
            <?php $selected = (isset( $this->seizoens_kleuren_options('seizoen_0') ) && $this->seizoens_kleuren_options('seizoen_0') === 'lente') ? 'selected' : '' ; ?>
            <option value="lente" <?php echo $selected; ?>>Lente</option>
            <?php $selected = (isset( $this->seizoens_kleuren_options('seizoen_0') ) && $this->seizoens_kleuren_options('seizoen_0') === 'zomer') ? 'selected' : '' ; ?>
            <option value="zomer" <?php echo $selected; ?>>Zomer</option>
            <?php $selected = (isset( $this->seizoens_kleuren_options('seizoen_0') ) && $this->seizoens_kleuren_options('seizoen_0') === 'herfst') ? 'selected' : '' ; ?>
            <option value="herfst" <?php echo $selected; ?>>Herfst</option>
            <?php $selected = (isset( $this->seizoens_kleuren_options('seizoen_0') ) && $this->seizoens_kleuren_options('seizoen_0') === 'winter') ? 'selected' : '' ; ?>
            <option value="winter" <?php echo $selected; ?>>Winter</option>
        </select> <?php
    }

}
if ( is_admin() )
    $seizoens_kleuren = new SeizoensKleuren();

/* 
 * Retrieve this value with:
 * $seizoens_kleuren_options = get_option( 'seizoens_kleuren_option_name' ); // Array of All Options
 * $seizoen_0 = $seizoens_kleuren_options('seizoen_0'); // Seizoen:
 */

function seizoenplugin_enqueue_styles() 
{
    // Get the user's stylesheet choice from the options, default to "white"
    $seizoens_kleuren_options = get_option( 'lente');

    // Conditionally load the appropriate stylesheet
    if( $seizoens_kleuren_options == 'lente' ) {
        wp_enqueue_style( 'seizoenplugin-lente', plugins_url( '/css/lente.css', __FILE__ ) );
    } elseif( $seizoens_kleuren_options == 'zomer') {
        wp_enqueue_style( 'seizoenplugin-zomer', plugins_url( '/css/zomer.css', __FILE__ ) );
    } elseif( $seizoens_kleuren_options == 'herfst') {
      wp_enqueue_style( 'seizoenplugin-herfst', plugins_url( '/css/herfst.css', __FILE__ ) );
    } elseif( $seizoens_kleuren_options == 'winter') {
    wp_enqueue_style( 'seizoenplugin-winter', plugins_url( '/css/winter.css', __FILE__ ) );
  }
}

add_action('admin_enqueue_scripts', 'seizoenplugin_enqueue_styles' );

  
  ?>

Any help would be greatly appreciated :).
Cheers!

redirects – Show contents of third party page on subdomain without changing URL

You cannot achieve this through DNS alone. There are two options:

Get cooperation from your podcast provider

If your podcast provider is able to host your subdomain for you, you could get the content to appear there. The proceedure would be:

  1. You point DNS for your subdomain to their server (mypodcastprovider.example)
  2. They configure their server to show your feed content for that subdomain

If they are unwilling or unable to cooperate and configure their server to do this, it won’t work.

Use a reverse proxy

A reverse proxy is a web server that doesn’t have its own content. Instead, it dynamically fetches content from another site and republishes it. If you run a reverse proxy on your feed subdomain, your server will appear to visitors to host the content from your feed provider. In reality, when a visitor requests content from your feed subdomain, your server will fetch it in the background from your feed provider and relay it to the user. To make this work you need to:

  1. Add your feed subdomain to your hosting. This is usually done as an add-on domain, or if you run your own server by configuring a virtual host.

  2. Ensure that proxy modules are enabled on your web server

  3. Configure the proxy. In .htaccess with mod_rewrite this could be as simple as:

       RewriteEngine On
       RewriteRule (.*) https://mypodcastprovider.example/mypodcastfeed (P)