News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SimpleSEF 2.0 (SMF 1.1.x and SMF 2.0)

Started by SlammedDime, December 05, 2009, 10:08:40 PM

Previous topic - Next topic

Ryan2320

Hey SlammedDime,

I was wondering if you could just give me a time line of when you think you can get to this issue:
http://www.simplemachines.org/community/index.php?topic=352351.msg2771443#msg2771443

Thanks for taking your time to look into this issue, I really do appreciate it  :)
One more thing is that I am getting alot of these errors but can't tell if they are from other things They say the same thing as the errors in the previous post besides different times..

Ryan
PS. If this issue is too complicated let me know and I just put the old php back.

SlammedDime

The error doesn't contain any information, so I have no idea where to even start looking.  Does it only occur when you go to a non-existant page?  Has it always been occurring or only since I gave you the 404 code?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Ryan2320

As for as I know, it started when we put that newer code in (More than likely it is that code)..which is fine as long as its only the 404 error, which I think only happends when somebody goes to a non-existant page. I have no problem with that.

Did you get a chance to look at the topicseen issue? (With Simpleportal)

What you said earlier did work by just putting a comma in after /topicseen,/
What would I do to get the comma put in automatically after topicseen?

Thanks again,
Ryan

SlammedDime

In SimpleSEF.php:
Code (Find) Select
if ($value == '')
$sefstring3 .= $key . '/';


Code (Replace) Select
if ($value == '')
$sefstring3 .= $key . ',/';


I'll have to play a bit with the 404 code to see why it's throwing the error.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Ryan2320

Ok that fixed most of the issue,

This may help you find why the 404 is putting that error up..
I also noticed that when I now click on any board or topic, it seems like I get that same error.. as the 404 error

Guest                    Today at 05:07:13 PM 
     
http://informationtechsysforum.com/index.php   



Sorry I did not notice this before, As I am almost positive that this was happening before I added that new code in the SimpleSEF.php file

If there is anything I can do to help you solve this error let me know.

Thanks,
Ryan

SlammedDime

Can you remove that extra 404 code and see if the error still occurs?  You don't have to remove the language string, just the elseif statement from SimplSEF.php
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Ryan2320

I a bit lost, sorry...

I first just get rid of the elseif and tired it.. (that did not work I got an error)

I then removed the whole line that elseif was on and that also did not work (I got a blank page)

Tell me what to remove and I'll try it out..

Ryan

EDIT: I'll be playing around with the code...

SlammedDime

Remove the whole edit I gave you before...
      elseif (strpos($url_array[0], ',') === false)
      {
         header('HTTP/1.0 404 Not Found');
         fatal_lang_error('simplesef_404', false);
      }
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Ryan2320

Alright, Gone...

I also have no errors..

But I also now am unable to get the 404 error..(which you probably know)

Bugo

Hardcoded text:
Code (SimpleSEF_2-0.php) Select
// Intermezzo
if($needle_length == 0)
{
trigger_error(__FUNCTION__.'(): Empty delimiter.', E_USER_WARNING);
return false;
}
if($offset < 0)
{
$haystack = substr($haystack, -$offset);
$offset = 0;
}
elseif($offset >= $haystack_length)
{
trigger_error(__FUNCTION__.'(): Offset not contained in string.', E_USER_WARNING);
return false;
}

Ryan2320

#810
Quote from: Bugo on September 05, 2010, 10:13:43 AM
Hardcoded text:
Code (SimpleSEF_2-0.php) Select
// Intermezzo
if($needle_length == 0)
{
trigger_error(__FUNCTION__.'(): Empty delimiter.', E_USER_WARNING);
return false;
}
if($offset < 0)
{
$haystack = substr($haystack, -$offset);
$offset = 0;
}
elseif($offset >= $haystack_length)
{
trigger_error(__FUNCTION__.'(): Offset not contained in string.', E_USER_WARNING);
return false;
}



Is this code for me? or is this another issue?

I looked at my SimpleSEF (Just to if this code is in there and it is)
So I'm guessing this is another issue.

Ryan

Bugo


SlammedDime

It has to be hardcoded, it uses the trigger_error function, not one of SMF's error functions, because it is a PHP error, not a SMF error, and also it's possible SMF's language files may have not been loaded yet when it runs.  Thanks for the concern though :)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Bugo

even through?

global $txt;
trigger_error(__FUNCTION__.'(): '.$txt['any_variable'], E_USER_WARNING);

Ryan2320

This is what I would like to have, because if I put a non URL page (/something/random) all I get is the blank board index and since it shows the meta and keywords google still indexes my site at those fake URL pages.
http://www.simplemachines.org/community/index.php?topic=352351.msg2600405#msg2600405

I have looked and added the code but it does not want to work? So I put back the original code back. I do have Simple Portal install as well.

Any ideas?

Thanks Ryan

SlammedDime

Quote from: Bugo on September 06, 2010, 04:58:20 AM
even through?

global $txt;
trigger_error(__FUNCTION__.'(): '.$txt['any_variable'], E_USER_WARNING);

Quotealso it's possible SMF's language files may have not been loaded yet when it runs

If SMF's langauge files haven't been loaded, I can't call any $txt variables.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

frantic

#816
Installed this perfectly, everything works expect my forums stats page.  It'll just take me to my host provider stats page.  I've tested this on all my sites with or without this mod.  If i type the stats in any of my sites i think my hosting provider redirects you to its stat page when i just want smf's stats page. I beleive my hosting provider redirects you to their pages on certain keywords to be a quick shortcut. I tried stripping the words stats but it didn't have any effect, it still redirects me right away. Any ideas on how to get around this?

Awilum

#817
Оne more problem.

Оn my forum have a user PHP his id 115

http://webdevart.ru/profile/php-115

If I login then i see my own administrator profile, not php-115 If not then error User does not exist.

Web Development Art - Programming :: Design :: SEO
| My web projects |

Awilum

it's strange not working http://webdevart.ru/profile/php-115  and http://webdevart.ru/profile/phpblabla-115/ are already working
PHP forbidden word or what?
I looked at the option "Words to strip" there is no php
Web Development Art - Programming :: Design :: SEO
| My web projects |

frantic

another SMF Arcade & SimpleSef problem.  Is their a fix to get the scores to post.  It just takes me to page that says too many redirects.

Advertisement: