Advertisement:

Author Topic: help two problem  (Read 1089 times)

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
help two problem
« on: January 09, 2018, 04:25:39 PM »
1 problem duplicated installation



2 problem mod Restrict Posts Per Board

https://custom.simplemachines.org/mods/index.php?mod=3586

I would like to use this mod to set a limit of responses to users
but when I go to apply the settings, I get this error

{"result":false,"data":"Opps! It seems your session is invalid, please try again"}

can you solve or is there a way to limit responses to users?

Offline SaltedWeb

  • Sr. Member
  • ****
  • Posts: 861
  • Gender: Male
  • The Tired One
Re: help two problem
« Reply #1 on: January 09, 2018, 04:34:16 PM »
The Mod issue can probably best be helped by posting the question with the mod developer including any other mods you may have installed.
The mods discussion url.
https://www.simplemachines.org/community/index.php?topic=494061.0
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #2 on: January 09, 2018, 04:41:05 PM »
Quote from: xena1997
1 problem duplicated installation




Attach your theme's index.template.php file and we'll correct it.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #3 on: January 09, 2018, 04:43:42 PM »
ok, always kind friend
the theme template file in use?
I take it from the theme folder in use by da cpanel?

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #4 on: January 09, 2018, 04:51:17 PM »
Yep.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #5 on: January 09, 2018, 04:53:35 PM »
bro file

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,465
Re: help two problem
« Reply #6 on: January 09, 2018, 05:11:51 PM »
That's interesting.  Which theme are you using?

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #7 on: January 09, 2018, 05:14:52 PM »
theme
The Gray

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,465
Re: help two problem
« Reply #8 on: January 09, 2018, 05:24:03 PM »
Your template is broken, doesn't work in The Gray theme.  Is that the file from your production forum?

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #9 on: January 09, 2018, 05:26:14 PM »
my forum e theme work

https://crackingeurope.eu/index.php

I just have to correct a double-appearing entry

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,465
Re: help two problem
« Reply #10 on: January 09, 2018, 05:42:10 PM »
Look for this in index.english.php (or your corresponding language file) -

Code: [Select]

$forum_copyright = '<a href="' . $scripturl . '?action=credits" title="Simple Machines Forum" target="_blank" class="new_win">%1$s</a> |
 <a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">SMF &copy; 2017</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>';


Mods may have added duplicate lines.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #11 on: January 09, 2018, 05:48:49 PM »
hello not practic

@ sǝ ๅ qɯɐɥS I'm waiting for him to correct the file

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,465
Re: help two problem
« Reply #12 on: January 09, 2018, 05:53:48 PM »
There's nothing wrong with the index template you posted, the code is correct.  $forum_copyright contains the copyright text, and it's pulled into the template from the language file.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #13 on: January 09, 2018, 05:58:02 PM »
friend as in the image you see that there are double written?


Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,465
Re: help two problem
« Reply #14 on: January 09, 2018, 06:09:19 PM »
<sigh>  You're not paying attention.  The copyright text is in the language file.  It's called in index.template.php by theme_copyright() function -

Code: [Select]

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footer_section"><div class="frame">
<ul class="reset">
<li class="copyright">', theme_copyright(), '</li>
<li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
<li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>', $txt['wap2'], '</span></a></li>
</ul>';

// Show the load time?


Which is put together in Subs.php -

Code: [Select]

// Show the copyright...
function theme_copyright($get_it = false)
{
global $forum_copyright, $context, $boardurl, $forum_version, $txt, $modSettings;

// Don't display copyright for things like SSI.
if (!isset($forum_version))
return;

// Put in the version...
$forum_copyright = sprintf($forum_copyright, $forum_version);

echo '
<span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;">' . $forum_copyright . '
</span>';
}


The actual text is in the language file -

Code: [Select]

$forum_copyright = '<a href="' . $scripturl . '?action=credits" title="Simple Machines Forum" target="_blank" class="new_win">%1$s</a> |
 <a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">SMF &copy; 2017</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>';


Look in the language file for the duplicate code.


Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #15 on: January 09, 2018, 06:12:24 PM »
thanks bro

@sǝๅqɯɐɥS
I prefer to wait for him to correct the template
so I just have to load it

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #16 on: January 09, 2018, 06:49:43 PM »
Follow the advice given above:

https://www.simplemachines.org/community/index.php?topic=558210.msg3956558#msg3956558

That will lead you to the solution

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,616
  • Gender: Male
    • Kindred-999 on GitHub
Re: help two problem
« Reply #17 on: January 09, 2018, 07:00:32 PM »
Also, a few things...
1- problems with mods should be asked for help in the thread dedicated to supporting that specific mod.
(this is the second or third mod problem that you asked in the smf general support -- ask in the mod support next time, please)

2- if the mod double installed that code, there is a good change that other code was also double installed and you will have to manually remove the other duplicated code.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #18 on: January 10, 2018, 12:43:08 AM »
I'm not practical to make changes anyone can help me edit the template?

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #19 on: January 10, 2018, 06:54:43 AM »
I only have the index.english.php file in the theme folder in use
there is no index.italian file, php
I enclose the file index.english.php in the post

p.s while in the default theme I found the index.italian.php file
I also attach this thanks

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,616
  • Gender: Male
    • Kindred-999 on GitHub
Re: help two problem
« Reply #20 on: January 10, 2018, 07:01:00 AM »

1- problems with mods should be asked for help in the thread dedicated to supporting that specific mod.
(this is the second or third mod problem that you asked in the smf general support -- ask in the mod support next time, please)

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #21 on: January 10, 2018, 07:19:24 AM »
I do not speak more than mod now I ask assistance in this discussion only
for the index file

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #22 on: January 10, 2018, 07:52:30 AM »
Can you attach your Sources/Subs.php file please?

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #23 on: January 10, 2018, 08:01:23 AM »
sure my friend
here is the file

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #24 on: January 10, 2018, 08:23:35 AM »
Hmm.. can we just get a look at your QueryString.php file too please?

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,583
Re: help two problem
« Reply #25 on: January 10, 2018, 08:24:18 AM »
is it possible the copyright is added with hooks and the hooks could be duplicated somehow to cause this?

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #26 on: January 10, 2018, 08:26:37 AM »
The SMF copyright only appears once, but you know what these smfpacks people are like with their copyright strings...

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #27 on: January 10, 2018, 08:28:21 AM »
bro file query

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #28 on: January 10, 2018, 08:39:53 AM »
Ok, looks like we might have found the problem.

Replace your QueryString.php file with the attached:

Depending on how it then looks we may need to make a further edit to it.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #29 on: January 10, 2018, 10:19:26 AM »
now I replace the file and then you link to the forum so see if everything is OK?

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #30 on: January 10, 2018, 10:20:05 AM »
Go for it

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #31 on: January 10, 2018, 10:26:03 AM »
As suspected, another edit is required. Try this version now:

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #32 on: January 10, 2018, 10:29:56 AM »
friend there is still a small double written error
can you correct?

https://crackingeurope.eu/index.php

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #33 on: January 10, 2018, 10:31:47 AM »
Yes. Both "SMF ads" and "Simple Audio Video Embedder" mods have been multi-installed.

The below should fix it, or at least get really close to it.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #34 on: January 10, 2018, 10:33:52 AM »
sembra tutto ok cosa dici tu?



    SMF 2.0.15 | SMF © 2017, Simple Machines
    XHTML RSS WAP2

Pagina creata in 0.318 secondi con 17 interrogazioni al database.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #35 on: January 10, 2018, 10:36:13 AM »
Yes, unfortunately all mod copyrights have disappeared, try this:

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #36 on: January 10, 2018, 10:38:33 AM »
no friend better the one without rights
this made it all double back

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #37 on: January 10, 2018, 10:40:37 AM »
Yes. Leave it with me while I try and sort it out correctly.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #38 on: January 10, 2018, 10:41:37 AM »
I'm waiting for your news thanks friend

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #39 on: January 10, 2018, 11:24:23 AM »
It's a tough one to debug, this.

The copyrights/banners are being added dynamically to the output buffer (which is ok) but it looks like QueryString function ob_sessrewrite is being called twice in succession, duplicating the addition of the copyrights/banners.

Looking at your Subs.php I can now see the duplicated call as described above.

Please replace your QueryString.php file with the one you originally supplied then upload the edited Subs.php as attached.

Offline xena1997

  • Full Member
  • ***
  • Posts: 532
Re: help two problem
« Reply #40 on: January 10, 2018, 12:17:15 PM »
the leggend very very thanks

Now everything seems correct you can watch?

https://crackingeurope.eu/index.php

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,206
  • Gender: Male
    • i30 Owners Club
Re: help two problem
« Reply #41 on: January 10, 2018, 12:18:36 PM »
Looks good to me mate :)