Skip to main content
Recent Posts
1
Support / Re: "Missing Key" error on reply-email
Last post by rjm -
I tried two different email-domain addresses, and also answered using not my desktop email-client but also webmail client.
Mail arrive still in moderation queue...

BTW: I see a function function mail_insert_key($message, $unq_head, $line_break) (line 785), which is declared as a "safety net for clients that strip out the message-id and in-reply-to headers".
Indeed, I see such a key - e.g.: ELK-d6aa927ccde3acc5826c9f88a7c6a874, but this is not part of the reply. But when I add this to the reply, it still remains in the moderation queue.

I think I'd add a log file entry where generated keys in mail_insert_key are stored - as an aid to find the final cause of the problem.
2
Support / Re: How to use Matomo
Last post by augras -
It works !
Maybe it's not the better way...

In ./themes/default/index.template.php, just at the beginning but after
Code: [Select]
<?php
i insert
Code: [Select]
require 'matomo.php';
In ./themes/default/ i created the file matomo.php with the code :
Code: [Select]
<html>
<head>
<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//augras.eu/matomo/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '5']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

<noscript>
<!-- Matomo Image Tracker-->
<img referrerpolicy="no-referrer-when-downgrade" src="https://augras.eu/matomo/matomo.php?idsite=5&amp;rec=1" style="border:0" alt="" />
<!-- End Matomo -->
</noscript>

It is important to don't close <html> and <head>.

And like this it works.

I don't know why it doesn't work as @badmonkey said, because it's nearly the same thing !

Now i need to remember that when there will be an update.



4
Support / Re: errors with images insert
Last post by Spuds -
Thanks for the details.  I'll add this to the tracker so someone can take a look and see why those errors are occuring.
5
Support / Re: "Missing Key" error on reply-email
Last post by Spuds -
Sorry I missed this post ... the key is added as part of the sendmail function which will be found in the mail.subs.php file

One the ElkArte side follow the information in this guide: https://github.com/elkarte/Elkarte/wiki/Posting-by-Email-Feature

If the sent email has all the right headers (and there is no reason it should not as long as you have followed the above) then the problem would be with the email client that is responding.  Not all email clients are well behaved.
6
Support / Re: How to use Matomo
Last post by augras -
The best option depends on your coding skill level. Good luck!
It's a very small level !

I tried to put the code (the code is ok : it works on other site, there is just to change a number) :
Code: [Select]
<html>
<head>
<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//augras.eu/matomo/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '6']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

<noscript>
<!-- Matomo Image Tracker-->
<img referrerpolicy="no-referrer-when-downgrade" src="https://augras.eu/matomo/matomo.php?idsite=6&amp;rec=1" style="border:0" alt="" />
<!-- End Matomo -->
</noscript>
</head>
</html>
in a addon subst file (UltimateMenu.subs.php, and some others) but get the error
Code: [Select]
syntax error unexpected 'trackPageView' (T_STRING), expecting ';' or ','

But maybe it's not what you mean ?

Maybe it will be a good idea to make an addon to put some scripts easily in head and in body ?
You understand i can't do that :).

Philippe
7
Support / Re: errors with images insert
Last post by augras -
Sometimes the image is insert but some times no : there is the code, for example, at the place of the image
[attach width=80 height=77 align=left type=thumb]199[/attach]
Hi,
It seems it was a mistake by the user : the images are today display and no code anymore, after the user corrects his manipulations.

But the errors in the logs are still here each time a user wants to insert an image.

Have a good sunday everybody,
Philippe
8
Support / Re: How to use Matomo
Last post by augras -
Thank you @badmonkey ,

I think i have now all the options.

I was looking in /elkarte/index.php but of course it's in the template !

But it doen't work : i get the error : syntax error unexpected 'trackPageView' (T_STRING), expecting ';' or ','
And it's because the script is not correctly interpreted.

I put the code just before </head> but i can see that the color for the syntax is not good (here it's ok but in the file it's all yellow).

The code is :
Code: [Select]
<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//augras.eu/matomo/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '5']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

<noscript>
<!-- Matomo Image Tracker-->
<img referrerpolicy="no-referrer-when-downgrade" src="https://augras.eu/matomo/matomo.php?idsite=5&amp;rec=1" style="border:0" alt="" />
<!-- End Matomo -->
</noscript>

I will try with an addon.

Thank you,
Philippe
9
Support / Re: How to use Matomo
Last post by badmonkey -
Hi,
I would like to use Matomo but i don't know where insert the code !
To use Matomo a code must be insert and Matomo says "We recommend that you place it immediately before the closing </head> tag.".
But in the index.php there isn't this tag.
Somebody knows how to do with Elkarte ?
Thanck you,
Philippe


Hey Philippe! There are several options you could consider to accomplish your goal.

The first employs direct hardcode edits. In ./themes/default edit index.template.php. Find the </head> tag around line 221. Add the needed code just before it. If your site offers other themes, you'll need to edit the index.template files for them as well.

Another option would be adding an integration hook and a file containing the needed code. It could even be packaged as an add-on! If you aren't certain how to accomplish it this way, it probably isn't the option you'd want to use.

Yet another option is using an existing add on to inject the needed code. Simple Ads or Simple Portal add ons could both accomplish this. In a nutshell you'd add an html block, then inject the code like this:

Code: [Select]
<head>
.....custom code here.....
</head>

and set the block location nearest the top of the page (header, or something like that).

The best option depends on your coding skill level. Good luck!
10
Support / errors with images insert
Last post by augras -
Hi,

I'm with Elkarte1.1.8 and only 2 addons on this Elkarte (FlarumStyle, MPAAP: Modify Posts At Anytime Permission).

I have these 2 errors, always the same (121) :

Jeudi 02 Décembre 2021, 09:49:17
WbVJxVihWOqvbGj6d0fWZqltst6v5cXR
Type d'erreur: Générale
Notice: Trying to access array offset on value of type null
https:///puppy_forum/index.php?action=dlattach;attach=post_tmp_60_a36644a2440cb95d8cacff4632aa11de;thumb
Fichier: /puppy_forum/sources/Load.php
Ligne: 1817
      
Jeudi 02 Décembre 2021, 09:49:17
WbVJxVihWOqvbGj6d0fWZqltst6v5cXR
Type d'erreur: Non défini
Notice: Undefined index: mod_cache
https:///puppy_forum/index.php?action=dlattach;attach=post_tmp_60_a36644a2440cb95d8cacff4632aa11de;thumb
Fichier: /public_html/augras.eu/puppy_forum/sources/Load.php
Ligne: 1817

Sometimes the image is insert but some times no : there is the code, for example, at the place of the image
[attach width=80 height=77 align=left type=thumb]199[/attach]

the file is under the post and the image display at this place.

You can see here :
https://augras.eu/puppy_forum/index.php?topic=174.msg636;topicseen#new

and here with the same user it works fine but the errors are in the logs :
https://augras.eu/puppy_forum/index.php?topic=169.0

Thanks for your help,
Philippe