[Xen-Soluce] SEO Optimization

[Xen-Soluce] SEO Optimization [Paid] 2.6.3 Fix 3

No permission to buy (€20.00)
Ok, i have checked you twitter:image in seo_macros and the other in metadata_macros;
seems the template mod is not working here;
will check in a minute.

Do you have any idea about the original attachment and how to use it for og?
 
This is your story, but do you really want people to install another add-on to make this add-on working?

attachments for guests in the forum: NO!
attachments as og: yes, sure, else it makes no sense to use it.
also use the attachment itself and not the thumb for og.
As a robot is a guests , technically this rebot must have access as a guests ....

I'm just giving you a solution, then we'll have to see how to allow the attachment specified in the meta to have access as a guest.
 
When i search for "twitter:image" I find two of them; one in the original macro, one in yours.
If I change this to "twodder:image" and "twammer:image"; i should find one of them in my source-code?

There are two other add-ons, one for SEO, one for OG: I will remove them now ...
 
Nothing with that add-ons.

Maybe I should say, that I dont talk about the og:image now!
I talk about twitter:image!

I have removed now the two twitter:image lines in the templates; funny, funny, again it is a cache-problem.
The og:image is fine;
 
Yes, as said, it is again a cache-problem; this browser will bring me to grave one day.
But from where could come this {board_url}{attach_url}

And do you have added any trigger for full_attach and thumb?
There is no trigger in XF, right?
 
Ok, here what I have found:

for full and thumb, please be so kind and add a trigger for

Code:
public function getAttachment($attachments, $default, $canViewAttachment)

in the AbstractHandler


The problem with {boardurl}/attach_url is only visible for a guest, not when I am logged in.

If I change your code here:
Code:
                if($attachment->has_thumbnail)
                {
                    $imageUrl = rtrim(\XF::app()->request()->getHostUrl(), '/') . '/' . ltrim($attachment->thumbnail_url, '/');

                    if($canViewAttachment)
                    {
                        $imageUrl = \XF::app()->router()->buildLink('full:attachments', $attachment);
                    }

//added by r9
                    $imageUrl = \XF::app()->router()->buildLink('full:attachments', $attachment);
//
                    return $imageUrl;
                }

there is no prblem; so maybe ...

the problem is here?

Code:
$imageUrl = rtrim(\XF::app()->request()->getHostUrl(), '/') . '/' . ltrim($attachment->thumbnail_url, '/');
 
Code:
$imageUrl = rtrim(\XF::app()->request()->getHostUrl(), '') . '/' . ltrim($attachment->thumbnail_url, '/');

seems to solve it?
 
Another question, please:

Code:
if($attachment->has_thumbnail)

Are there attachments without thumbnails?

Then we have to add something like

Code:
                else
                {
                    $imageUrl = \XF::app()->router()->buildLink('full:attachments', $attachment);
                }



Oh! Ok, maybe every picture has a thumb, but not every attachment is a picture?
 
Another question, please:

Code:
if($attachment->has_thumbnail)

Are there attachments without thumbnails?

Then we have to add something like

Code:
                else
                {
                    $imageUrl = \XF::app()->router()->buildLink('full:attachments', $attachment);
                }



Oh! Ok, maybe every picture has a thumb, but not every attachment is a picture?
Yes, attachments must be pictures for og:image
 
There is indeed a problem for og:image as guests can't see thread attachments, so the default image of the og:image is used. We need to set up a system and say that if there is an attachment and this attachment is used for the meta og:image twitter:image then this attachment must be available for guests.
 
Have you checked this one, please?

Code:
$imageUrl = rtrim(\XF::app()->request()->getHostUrl(), '/') . '/' . ltrim($attachment->thumbnail_url, '/');
$imageUrl = rtrim(\XF::app()->request()->getHostUrl(), '') . '/' . ltrim($attachment->thumbnail_url, '/');
 
I am not sure, what I should do now:

Forum A: I dont care who can see images; ok lets set them free for everyone to have my full attach as og; (with change in your script)
Forum B: No way! Google should not collect these pictures, only special user group should see them.
This means I have to link or upload an og.

In my case I need something like this:

upload icon with 1200*600;
create icon
save full picture as attach to message
set blur_filter with too much blur to picture and save it as og

Before I can do this, I need your change for upload an og;
or I save it in a dir that is not controlled by XF, and save the link /freeogs/[floored id}/id.jpg

Do you have any time planned for the next update, please?
 
Sorry, not finished:

Code:
foreach($attachments as $attachment)


If we have ten attachments, we run this ten times, right?
And finally, choose the last one image.
Is the last one always the same?


Is there any sense if we could choose a random one from them every time someone asks for Og?
And should we run the foreach only one time until we have an image instead?
 
There is indeed a problem for og:image as guests can't see thread attachments, so the default image of the og:image is used. We need to set up a system and say that if there is an attachment and this attachment is used for the meta og:image twitter:image then this attachment must be available for guests.
I have just redone some tests and in fact it works very well the robo have access to the attachment.
 
foreach($attachments as $attachment)

my fault.





Is there a difference between Twitter calling forumname.com/attachment/lalala/238383 and me as a guest copying this URL to a browser?

I am local in WSL, I will set up a clean forum to test it.
 
I have added a function to save my og:image in data/{floored}/thread_id.jpg

Do you think, it makes sense to save like {thread_id}-{thread_url}.jpg? for seo-reasons to have the picture in the google pictures?

Is there anything i can send the url to, to save it in your fields?
 
Code:
        $seo = $this->thread->xs_seo;
        $seo['open_graph'] = $ogUrl;
        $this->thread->xs_seo = $seo;

How much I love it!
Upload my picture, get my og:image also.
 
Top Bottom