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

mrday

#1140
I can do something with php.
So i also need some query to retrieve information about, for example, the name of the category by it's number? and same for the name of the article? right?
What the second function do? It rebuild the original url?
Thanks

NanoSector

Quote from: mrday on May 12, 2011, 03:35:50 PM
I can do something with php.
So i also need some query to retrieve information about, for example, the name of the category by it's number? and same for the name of the article? right?
What the second function do? It rebuild the original url?
Thanks
The query:

$query = $smcFunc['db_query']('SELECT * FROM {db_prefix}boards WHERE id_board=1');
while ($boardinfo = $smcFunc['db_fetch_assoc'])
{
echo $boardinfo['name'];
}

is PHP code to gather the board info where the ID is 1.
This also displays the name.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

mrday

Thank you for the hint Yoshi.
I think i made the firt function but now i need to know how the second function work. Thanks

Yağız...

Hey SD, any news for PrettyUrls converter?

mrday

This is my ssef_articles plug in, alpha version (I have tested it on 1.1.13), you can try it with no problems because you can easily remove the php file if it don't work. Important, before to install simplesef mod and before to place the file ssef_articoli.php in the /Sources/SimpleSEF-Ext directory, remember to rename the action=articles in action=articoli everywhere. Since i'm not a mods author, since many url in for the action=articles are not visible by google and since I have some problems with simplesef, I organized the plugin to work only when you are watching a category or an article, the rest of the urls for the action=articoli will be "simplesefed" in the classic way.
Urls will be rewrited like:
http://yourdomain/index.php/articoli;cat=11 -> http://yourdomain/articoli/categoryname.cat11/
http://yourdomain/index.php?action=articoli;sa=view;article=138 -> http://yourdomain/articoli/categoryname/articlename.art138.html

Every person, included simplesef author, is free to improve, modify delete my name  or whatever he want from this code, I'm not interested in a recognition, I did this plugin just because I need it and once done it makes no senso to don't share it.

* IMPORTANT---------------------------------------------BEFORE TO INSTALL-------------------------------------------------InSTRUCTIONS
* For first, before to apply this mod, like you can see on what action it works, you have to edit Articles.Template.php(themes),
* Articles.php(sources), who.english.php(languages), index.php(board), index.template(themes) and subs.php(sources) by sobstituting all
* the "action=articles" with "action=articoli" , else simplesef will point at the folder(with the url "index.php/articles") of the
* articles mod and users will get an access denied.
* ----------------------------------------------------------------------------------------------------------------------------------------------------------*

Chair

When I click "enable simplesef" and then click "save", it refreshes the page and the box i checked remains unchecked... doesn't do anything to the URL's either. SMF 2.0RC5... Is there something you know of that might be conflicting with this? I did originally have SMF's built-in SEF URLs enabled but I've tested the mod with that setting both enabled and disabled but I'm getting the same result... Would be nice to know how to fix :)

SlammedDime

Please see the FAQ in the very first post and also please see the help text in the SimpleSEF settings page.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

pzyhô

Heyho whats this error message mean ?

Got this on a lot of pages maybe on all.

smf version: 2.0 rc5


8: Uninitialized string offset: 5
Datei: /htdocs/forum/Sources/SimpleSEF.php
Zeile: 1299

8: Uninitialized string offset: 6
Datei: /htdocs/forum/Sources/SimpleSEF.php
Zeile: 1300

8: Uninitialized string offset: 7
Datei: /htdocs/forum/Sources/SimpleSEF.php
Zeile: 1301


Thanks in advance
pzyhô
My Mods: click

SlammedDime

That means that an invalid UTF8 character was passed to the encode function.  What language is your forum? 
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

pzyhô

My Mods: click

MrMike

I installed Simple SEF and love it. Great mod, easy to install, works like a charm. :)

I've found one problem that I'm looking for some assistance with: When it's installed along with the Avatar Verification package, the avatar that the user is supposed to match against doesn't appear.

The avatar image link is normally like this:

<img src="http://mydomain.com/index.php?action=verificationsimages&avatar=Icons/Audio.png&type=1" alt="">

(The actual name of the PNG file varies, of course.)

With Simple SEF activated, the avatar link is transformed into this:
<img src="http://mydomain.com/verificationsimages/avatar,Icons/Audio.png/type,1/" alt="">

I'm guessing that I need to add something in the "Actions" section at the bottom of the Simple SEF options page, but I don't know what to add. (Or maybe I need to remove something?)

I'm using SMF 1.1.13 with the "nly-grey" theme. I have some other packages installed but they don't seem to be part of the issue. Turning Simple SEF off makes the Avatar Verification work normally.

How can I resolve this?

SlammedDime

Unfortunately there is no easy way to resolve this.  The proper way would be for the author of Avatar Verification to url_encode the 'avatar' parameter, as it should be since '/' is being used as part of the request, not a directory separator.

In the version of SimpleSEF for SMF 2.0, you could just add 'verificationsimages' to the ignore list, but that feature is not present in the SMF 1.1.13 version.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

MrMike

#1152
Edit: Ignore my previous "fix". It's not 100%, and I'm still working on it.





BeingSimplest

Hi, I have a simple question.

Where can I enable SimpleSEF? I tried to go to Modification Settings in AdminCP but couldn't find it :)

Thanks.

SlammedDime

If you're on SMF 1.1.x, it's in Feature Settings.  If you're on SMF 2.0, it has it's own settings under the 'Configuration' menu.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

BeingSimplest

#1155
Gosh, it was because I forgot to rename the file Sources/SimpleSEF_2.0.php into SimpleSEF.php...

But now I got another problem, when I click on a certain board/forum, it redirects me to the same place which is homepage. Is that something wrong with .htaccess? I've cleared the file cache already.

RewriteEngine On
# Uncomment the following line if it's not working right
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


You can see here: vnsp-community.net [nofollow]

spiros

Does it work with Greek extended (polytonic)? Is there a test forum I could experiment?

SlammedDime

spiros - I don't know, I'm not familiar with the characters.  I would just setup your own test board and install the mod and test it out.

BeingSimplest - Is there any particular reason you installed it manually instead of through the package manager?  Have you made sure all files are in their proper spot?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

BeingSimplest

@SlammedDime: Did I install it manually? I'm confused, these are my steps:

1) Upload all files/folders onto the right spots
2) Create folder Sources/SimpleSEF-Ext/
3) Since in the installing package, the file Sources/SimpleSEF.php is actually named SimpleSEF_2.0.php, I had to rename it. If I don't rename, its setting won't exist in ACP.
4) Run add_settings.php

Is that all? Check out to see how it occurs: vnsp-community.net [nofollow]

I guess this is a problem with htaccess.

SlammedDime

Are you familiar with SMF's package manager?  It automatically installs packages for you through your admin interface.  It is by far the preferred method of installing mods.

It looks like topics and users work fine, it's just boards having a problem.  Can you disable the 'Simple' setting and see if that allows boards to work?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: