E107: Feature Request: URL SELF for SITE LINKS

Created on 21 Jul 2019  路  14Comments  路  Source: e107inc/e107

Please, a link of the type http://www.dominio.com/e107_plugins/pluginname/page.php, is not viable or attractive and very long to remember or share

awaiting feedback

Most helpful comment

A pleasure to help with something

All 14 comments

Check your URL configuration, there are already plenty of options for Search Engine Friendly URLs.

Admin Area > Settings > URL configuration.
If you have selected friendly URLs there, you can use those in Sitelinks.

For plugins, you can make use of the e_url.php addon. Examples are in several plugins, including the _blank one. You can also check my Wrapper plugin for a simple example.

Mod-rewrite is disabled. To enable, please add the following line to your e107_config.php file:
Sorry.
But does it work with jquery and ajax?
It doesn't show me the page as it should.

Several things to check:

  • Make sure you have an .htaccess file that is the same contents as the e107.htaccess file on GitHub.

  • Ask your hosting provider if mod rewrite is enabled.

  • Add the code as instructed in the admin area, to your e107_config.php.

Ajax and jQuery are not likely to be related to this issue.

@Moc Ajax/ JS can be a problem. with SEF-URL page URL is changed and if ajax or js use relative URLs, they will stop to work (or better they call the wrong path)
If you check the console, there are errors about this

image

In fact, I think that I asked a similar question some years ago without an answer.

@Jimmi08 Yes, I have already seen the error.
I will have to look at how to solve it.
Thank you very much, if I find out I will share it.

could it be an issue within the plugin e_url.php???

Maybe not coded right?

`class awards_url // plugin-folder + '_url'
{
function config()
{
$config = array();

    $config['awards'] = array(
        'alias'         => 'awards',
        'regex'         => '^{alias}(.*)$',
        'sef'           => '{alias}/awards',
        'redirect'      => '{e_PLUGIN}awards/awards.php'            
    );

    return $config;
}`

that would point to https://501stlegion-a3.com/awards

'sef' => '{alias}/clan/sandstorm',
'sef' => '{alias}/clan/'.$ClanName.'',

@LaocheXe
That example looks correct, but that line with'sef' => '{alias}/clan/'.$ClanName.'', not.
Is this another plugin for clans?

@jimmi08 i understand, but as chory is getting a warning about mod rewrite in the admin area, I think it is more likely to be a server configuration or htaccess issue

@Jimmi08 I don't know, was just giving an example of how I would do it

@Moc The warning is fixed.
Now I have to look at how to make AJAX load the file it calls correctly.

@Jimmi08 clan, it has no plugin

Solved
http://www.clan-toro.es/sandstorm
`class clan_url
{

function config()
{
    $config = array();

    $config['sandstorm'] = array(
        'regex'         => '^sandstorm/?',
        'sef'           => 'sandstorm',
        'redirect'      => '{e_PLUGIN}clan/servidorSandstorm.php',
    );

/File called from {e_PLUGIN}clan/servidorSandstorm.php/
$config['帽aca'] = array(
'regex' => '%C3%B1aca.php',
'sef' => '%C3%B1aca.php',
'redirect' => '{e_PLUGIN}clan/帽aca.php'
);

/* File called from 帽aca.php */
$config['XXXX'] = array(
'regex' => 'XXXX.php',
'sef' => 'XXXX.php',
'redirect' => '{e_PLUGIN}clan/XXXX.php'
);

    return $config;
}

}`

So you added "e107 internal redirects" for ajax calls? It's very bad name for this, it's not "redirect" but you know what I mean.
If yes, I need to decide if this is terrific or brilliant :)

Hm, on second thoughts, easy and brilliant, you let on e107 SEF-URL system to "offer" content on different URL for ajax call. I will test this when I will have time with old clanmembers plugins. Thanks for sharing.

A pleasure to help with something

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jimmi08 picture Jimmi08  路  3Comments

Jimmi08 picture Jimmi08  路  3Comments

Jimmi08 picture Jimmi08  路  5Comments

realmontazeri picture realmontazeri  路  5Comments

simplythomasjay picture simplythomasjay  路  5Comments