51
Dylian
Re: Converting from latin1 to utf8
  • 2009/12/30 12:20

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


You could try this (altough it's a wierd way to do it, it should work). 1. Dump your MySQL database to a file on your pc; 2. Make a copy of the dump file (as backup); 2. Open the file with Notepad++; 3. Click on Format > Convert to UTF-8 without BOM; 4. Save the file; 5. Import the converted dump file in your database; 6. Run this php script:
<?php
// Database info
$dbhost 'localhost';
$dbuser 'db_user';
$dbpass 'password';
$dbname 'db_name';
//---------------
header('Content-type: text/plain');
$dbconn mysql_connect($dbhost$dbuser$dbpass) or die( mysql_error() );
$db mysql_select_db($dbname) or die( mysql_error() );

mysql_query("SET CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'"$db);

mysql_close($dbconn);
?>
7. Or if it still didn't work you could try this script:
<?php
// Database info
$dbhost 'localhost';
$dbuser 'db_user';
$dbpass 'password';
$dbname 'db_name';
//---------------
header('Content-type: text/plain');
$dbconn mysql_connect($dbhost$dbuser$dbpass) or die( mysql_error() );
$db mysql_select_db($dbname) or die( mysql_error() );

$sql 'SHOW TABLES';
$result mysql_query($sql) or die( mysql_error() );
while ( 
$row mysql_fetch_row($result) )
{
$table mysql_real_escape_string($row[0]);
$sql "ALTER TABLE $table DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
mysql_query($sql) or die( mysql_error() );
print 
"$table changed to UTF-8.n";
}

mysql_close($dbconn);
?>
Didn't try it but it's a combination of converting methods i found with google. Greets Dylian.



52
Dylian
Re: TDMDownloads 1.01 with SEO urls
  • 2009/12/27 0:45

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Ok, news 1.65 (by trabis) with this same kind of rewriting coming soon (i hope). Those urls will be pretty much the same so they will look like http:// www. yourdomain .com / modules / news / category . subcat / articlealias (Without spaces).

I'm hoping to get it finished before 1 feb next year.

Greets Dylian.



53
Dylian
Re: Change the redirect_header() url.
  • 2009/12/27 0:27

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


@Trabis, thanks a lot for reacting.

But strange enough both ways don't seem to fix the problem (i guess i'm doing something wrong).

1. I added the & symbol to url variable. But this didn't change anything. (As far as i noticed, my pages still redirect to www. instead of en.)

2. I changed $args[0] = ... ; to $url = ... ; and added the content (exept the preload part) of the redirect_header(); function to my preload. And this causes my pages (where the redirect_header(); function is called) to never stop loading. (Just like calling the redirect_header(); function again did before).

Do you know what the problem is?
And if you don't know it i think i'll just hack mainfile.php to check if $_GET['lang'] contains english and if it does then define the XOOPS url as en.dylian.eu and otherwise as www.dylian.eu .

Greets Dylian.



54
Dylian
Re: TDMDownloads 1.01 with SEO urls
  • 2009/12/25 13:46

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Not yet, maybe i'll create one next year.

Greets Dylian.

BTW You could always take look at the code in alias.php, singlefile.php, viewcat.php and the .htaccess file. (And the templates ofcourse)



55
Dylian
Re: Merry Christmas and Happy New Year 2010
  • 2009/12/24 19:38

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Merry christmas everyone.



56
Dylian
TDMDownloads 1.01 with SEO urls
  • 2009/12/24 18:40

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Hello, since i was optimizing my website for search engines and better usage i adjusted TDMDownloads to create seo urls.

This url's look like: http:// www . yourdomain . com / modules / tdmdownloads/ category . subcategory / file alias (Without spaces...)

So if there are more people who want this capability for TDMDownloads feel free to download the adjusted version of tdmdownloads here: http://en.dylian.eu/downloads/xoops.modules/TDMDownloads-SEO

Greets Dylian.

BTW I hope TDM will add this in their next version of TDMDownloads.



57
Dylian
Re: Change the redirect_header() url.
  • 2009/12/24 11:47

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


sorry, posted the wrong .htaccess file (the one i posted before wasn't copied because my real .htacess file is way to long to post here).

But i fixed the problem you mentioned by checking if a url contains ? and if it does then do "(url) ? ... = ... & lang = english" (without the spaces...).

My .htaccess rules: (the rewrite conditions do the ? and & switch)
[edit]Removed...[/edit]


[edit]
The code window messes up my code....
Please go to http://temp.dylian.eu/langRewrite.txt to see the correct .htaccess
[/edit]

[edit2]
Ok it wasn't the code window but the text sanitizer i think...
BTW You can already see the rewrite working if you go to http://en.dylian.eu/ (but you'll get redirected to www.dylian.eu if you go to a page that uses the redirect_header(); function)
[/edit2]


This works and doesn't create any problems for me, the only problem i have is that my redirect_header(); preload doesn't work.

Greets Dylian.



58
Dylian
Re: Change the redirect_header() url.
  • 2009/12/23 22:31

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


*** BUMP ***

Please, i really don't know how to fix this...

Greets Dylian.



59
Dylian
Re: Redirect page
  • 2009/12/23 9:54

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


remove the loadModuleAdminMenu(); function call before the redirect_header(); function call and it should work alright.

Greets Dylian.



60
Dylian
Re: Missing Bottom Block in theme
  • 2009/12/23 8:55

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


These themes are even nicer then most of the "new" ones that are posted here .

Thanks for bringing them back to life.

Greets Dylian.




TopTop
« 1 ... 3 4 5 (6) 7 8 9 ... 11 »



Login

Who's Online

74 user(s) are online (43 user(s) are browsing Support Forums)


Members: 1


Guests: 73


danielusa,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits