S04e12-Responsible Social Bookmarks QUESTIONS/SUPPORT

Open to all! Ask other shopowners for help.
Omar_one
Senior Contributor
Posts: 676
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

S04e12-Responsible Social Bookmarks QUESTIONS/SUPPORT

Post by Omar_one »

@ecartz
version 1.0.8.8
admin > layout modules > product info > {install} > responsible bookmarks
module installed and show on the product_info page but there is an error admin > layout modules > product info

Code: Select all

Notice: Undefined property: pi_responsible_social_bookmarks::$content_width 
in C:\xampp\htdocs\test\admin\modules_pi.php on line 272
and pressing on shear on facebook give an error (I am not sure if this error because I run 1.0.8.8 locally )

Code: Select all

Sorry, this feature isn't available right now: An error occurred while processing this request. 
Please try again later
and maybe change the Content Width as the new modules!

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
cristiangliga
Member
Posts: 9
Joined: Tue Feb 09, 2021 7:19 am
Phoenix Version:

Re: S04e12-Responsible Social Bookmarks

Post by cristiangliga »

Omar_one wrote: Sun Nov 28, 2021 3:08 pm admin > layout modules > product info > {install} > responsible bookmarks
module installed and show on the product_info page but there is an error admin > layout modules > product info

Code: Select all

Notice: Undefined property: pi_responsible_social_bookmarks::$content_width 
in C:\xampp\htdocs\test\admin\modules_pi.php on line 272
I'm getting the same error on Phoenix 1.0.8.14.

On page:

mywebsite/admin/modules_pi.php?module=pi_responsible_social_bookmarks

Under column Width, I get this error:

Notice: Undefined property: pi_responsible_social_bookmarks::$content_width in mywebsite/admin/modules_pi.php on line 272
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: S04e12-Responsible Social Bookmarks

Post by Fiber »

cristiangliga wrote: Mon Jun 27, 2022 12:45 am

Code: Select all

Notice: Undefined property: pi_responsible_social_bookmarks::$content_width 
in C:\xampp\htdocs\test\admin\modules_pi.php on line 272
Just installed in 1.0.8.16 and it works, just the notice:
In pi_responsible_social_bookmarks.php line 25

Code: Select all

$this->group = 'pi_modules_' . strtolower(PI_RESPONSIBLE_SOCIAL_BOOKMARKS_GROUP);
below that line add:

Code: Select all

$this->content_width = (int)'PI_MODEL_CONTENT_WIDTH';
and notice is gone :-)
Turn up the Max
User avatar
cristiangliga
Member
Posts: 9
Joined: Tue Feb 09, 2021 7:19 am
Phoenix Version:

Re: S04e12-Responsible Social Bookmarks

Post by cristiangliga »

Thank you @heatherbell and @Fiber for your help!
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: S04e12-Responsible Social Bookmarks

Post by raiwa »

In the latest Phoenix versions, "(int)'PI_MODEL_CONTENT_WIDTH" is directly used in the template files instead of "$this->content_width"
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
14Steve14
Senior Contributor
Posts: 921
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Social bookmarks separation of images

Post by 14Steve14 »

Whilst trying to get parts of the new site to look like the old current site I have come across a problem with the responsible social bookmarks module. So I have what is probably a simple thing to correct.

On my current site I have it looking like the top section of the attached image using the following code in the templates module

Code: Select all

<div class="col-sm-<?php echo $content_width; ?> pi-responsible-social-bookmarks">
<ul class="list-group">
    <li class="list-group-item d-flex justify-content-between align-items-center">
  <?php echo PI_RESPONSIBLE_SOCIAL_BOOKMARKS_PUBLIC_TITLE; ?>
    <?php echo implode('', $pi_sb_bookmarks); ?>
</li>    
  </ul>
</div>
Using the following code in the latest 1.0.8.20 code it looks like the lower image.

Code: Select all

<div class="<?= (int)PI_RESPONSIBLE_SOCIAL_BOOKMARKS_CONTENT_WIDTH ?> pi-responsible-social-bookmarks mb-2">
<ul class="list-group d-flex">
    <li class="list-group-item justify-content-between">
  <?= PI_RESPONSIBLE_SOCIAL_BOOKMARKS_PUBLIC_TITLE ?>
    <?= implode('', $pi_sb_bookmarks) ?>
</li>    
  </ul>
</div>
No matter what I try I cannot get the 3 icon things to spread across the whole width of the box with the text at the beginning. I have compared any css between the two sites and made them both the same. I have tried a search online to see whether other people may be having a similar problem and have tried a few different bits of bootstrap stuff but nothing changes them.

Does anyone have an idea where I may look to get this to look like the first image as it looks silly scrunched up.
bookmarks-image.png
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Social bookmarks separation of images

Post by burt »

Code: Select all

<div class="col-sm-<?= (int)PI_RESPONSIBLE_SOCIAL_BOOKMARKS_CONTENT_WIDTH ?> pi-responsible-social-bookmarks mb-2">
  <div class="d-flex justify-content-between">
    <h6><?= PI_RESPONSIBLE_SOCIAL_BOOKMARKS_PUBLIC_TITLE ?></h6>
    <?= implode('', $pi_sb_bookmarks) ?>
  </div>
</div>
Seems to do it....

d-flex justify-content-between only on the parent container. In your version it would be something like;

Code: Select all

<div class="col-sm-<?= (int)PI_RESPONSIBLE_SOCIAL_BOOKMARKS_CONTENT_WIDTH ?> pi-responsible-social-bookmarks mb-2">
  <ul class="list-group">
    <li class="list-group-item d-flex justify-content-between">
      <?= PI_RESPONSIBLE_SOCIAL_BOOKMARKS_PUBLIC_TITLE ?>
      <?= implode('', $pi_sb_bookmarks) ?>
    </li>    
  </ul>
</div>
Note that this addon is malformed compared to other PI modules;

1. It is missing col-sm- in the template file
2. It should only have a 12 11 10 9 8 7 6 5 4 3 2 1 selector in the module. It should not have an input for (eg) col-sm-12

I'm not sure when this bug was introduced, it may be there from the start. To solve;

In the module config input box, change from col-sm-12 to 12
In the template make sure you have col-sm- in the first div (as I have shown in the code examples above)

At some point, when I have time, I will get around to fixing the bug.
Strange it's not been noticed by anyone, maybe not many are using this addon.
Dan Cole
Senior Contributor
Posts: 498
Joined: Fri Oct 25, 2019 2:14 pm
Phoenix Version: 1.0.8.21
Has thanked: 67 times
Been thanked: 61 times

Re: Social bookmarks separation of images

Post by Dan Cole »

I'm not sure Steve, but I would try adding width: 100% to your css file if you haven't already.

Dan
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Social bookmarks separation of images

Post by burt »

And of course Elon changed to "X", so in the Twitter Language File;

Code: Select all

const MODULE_RESPONSIBLE_BOOKMARKS_TWITTER_PUBLIC_TITLE = '<i class="fab fa-twitter fa-fw"></i>';
To

Code: Select all

const MODULE_RESPONSIBLE_BOOKMARKS_TWITTER_PUBLIC_TITLE = '<i class="fab fa-x-twitter fa-fw"></i>';
Which should change the display from the Twitter Bird to X.
User avatar
tessthepup
Certified Developer
Posts: 381
Joined: Mon Mar 01, 2021 5:55 pm
Phoenix Version:
Has thanked: 47 times
Been thanked: 62 times

Re: S04e12-Responsible Social Bookmarks

Post by tessthepup »

burt wrote: Fri Dec 29, 2023 10:18 pm This update applies the following changes and has been tested on 1.0.8.20 and the upcoming 1.0.8.21
These are all relatively minor changes, so should work in versions at least back to 1.0.8.5

1. Updated copyright to Phoenix on all files.
2. Updated PI Module to a width selection (rather than a width input)
3. Updated PI template file to add col-sm-
4. Updated twitter module to use "X" logo rather than "bird" logo


S04e12-1.0.8.5 - Updated 2023.12.28.zip
@burt

Do we need to update the fontawesome cdn link to 6.5.1 as I can only find the x-twitter icon in that version on the fontawesome site?


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply