[ABD] Lexicon / Acronym MOD

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »

Hello,

Code: Select all

Erreur

Il semble qu'il y ait une erreur dans votre requête SQL. Le message ci-bas peut vous aider à en trouver la cause.

ERROR: Ponctuation invalide @ 105
STR: ->
SQL: $sql = "SELECT DISTINCT UPPER(LEFT(TRIM(term),1)) AS a FROM " . LEXICON_TABLE. " WHERE lang = '" . $user->lang['USER_LANG'] . "' ORDER BY a" 


requête SQL: Documentation

$sql = "SELECT DISTINCT UPPER(LEFT(TRIM(term),1)) AS a FROM " . LEXICON_TABLE. " WHERE lang = '" . $user->lang['USER_LANG'] . "' ORDER BY a"

MySQL a répondu:Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$sql = "SELECT DISTINCT UPPER(LEFT(TRIM(term),1)) AS a FROM " . LEXICON_TABLE. "' at line 1 
Thank you

reh
Registered User
Posts: 66
Joined: Mon Jun 28, 2004 7:55 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by reh »

You should try it with the string, which echo print in your website.
Your mySQL cant know, whats your $user var is or your LEXICON_TABLE constant.

If you dont like to change the php to print it, you must replace all the vars manually.

Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »

I'm sorry but i don't understand. :(

reh
Registered User
Posts: 66
Joined: Mon Jun 28, 2004 7:55 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by reh »

SELECT DISTINCT UPPER(LEFT(TRIM(term),1)) AS a FROM __YOUR_LEXICON_TABLE_NAME__ WHERE lang = '__YOUR_LANG__' ORDER BY a;

replace the __YOUR_xxx__ things with your values

Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »


reh
Registered User
Posts: 66
Joined: Mon Jun 28, 2004 7:55 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by reh »

Your word generell is found as G-word, so this should also find it:
SELECT TRIM(term) AS term, description, long_desc FROM phpbb3_lexicon
WHERE term LIKE 'G%' AND lang = 'fr' ORDER BY term";

If it find it, you must write an

Code: Select all

echo "sql = $sql";

after this line (68?) in lexicon.php

Code: Select all

  $sql = "SELECT TRIM(term) AS term, description, long_desc FROM " . LEXICON_TABLE . $where . " ORDER BY term";
and call http://oleronature.ovh.org/test/lexicon.php?letter=G& and look, if the sql after "sql = " look how it should.

Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »

Thank you.
reh wrote:Your word generell is found as G-word, so this should also find it:
SELECT TRIM(term) AS term, description, long_desc FROM phpbb3_lexicon
WHERE term LIKE 'G%' AND lang = 'fr' ORDER BY "term";
Yes "gastre" was found.
If it find it, you must write an

Code: Select all

echo "sql = $sql";
???

reh
Registered User
Posts: 66
Joined: Mon Jun 28, 2004 7:55 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by reh »

please read the ENTIRE post and do it

Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »

i add this in lexicon.php ?


echo "sql = $sql"; after $sql = "SELECT TRIM(term) AS term, description, long_desc FROM " . LEXICON_TABLE . $where . " ORDER BY term";

if i understand. :oops:

Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »

Hello,

i install a new version of phpbb3.0.2 with no mods.

I follow install_mod.xml and i install lexicon 0.1.3

I have the same problem.

If i had a space before and after don't work

If i hadn't it's ok but if acronym is in a word it's not ok.

No term when i clic on a letter in lexicon.php

I'm sorry but this mod is not very ready for prosilver and phpbb3 ?
But we are going to arrive there if you want.
I am going to read again this topic.

http://oleronature.ovh.org/phpbb4/viewtopic.php?f=2&t=2

Thanks ;)

Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »

in language/(en,de)/common.php

Code: Select all

//----------------------------------------------------------------------
// Lexicon MOD - Begin
'LEXICON_WORD' => 'Lexicon',
// Lexicon MOD - End
//----------------------------------------------------------------------
remplace with

Code: Select all

//----------------------------------------------------------------------
// Lexicon MOD - Begin
'LEXICON' => 'Lexicon',
// Lexicon MOD - End
//----------------------------------------------------------------------
because
Image


And in
language/(en,de)/acp/lexicon php is not the good files.

;)

reh
Registered User
Posts: 66
Joined: Mon Jun 28, 2004 7:55 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by reh »

I corrected the acp lang files in the zip (first post).
I'm sorry but this mod is not very ready for prosilver and phpbb3 ?
This mod is alpha and i wrote, im not use prosilver, therefore no support for it. Im added it here, why i thougth, maybe it can be usefull for someone.
Im not able to search errors i cant reproduce.
If you use alpha mods you should be able, to insert an echo in a page and tell me the output.

Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »

I do not know how to make "insert an echo in a page and tell me the output."

Bombybob
Registered User
Posts: 50
Joined: Sat Sep 06, 2008 11:51 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by Bombybob »

reh wrote:Your word generell is found as G-word, so this should also find it:
SELECT TRIM(term) AS term, description, long_desc FROM phpbb3_lexicon
WHERE term LIKE 'G%' AND lang = 'fr' ORDER BY term";

If it find it, you must write an

Code: Select all

echo "sql = $sql";

after this line (68?) in lexicon.php

Code: Select all

  $sql = "SELECT TRIM(term) AS term, description, long_desc FROM " . LEXICON_TABLE . $where . " ORDER BY term";
and call http://oleronature.ovh.org/test/lexicon.php?letter=G& and look, if the sql after "sql = " look how it should.

Code: Select all

    // Select entrys with letter
    $where = " WHERE " . ($letter == "#" ?
             $db->sql_in_set('LEFT(term,1)', $abc, true) :  // all not-letters
             "term LIKE '$letter%' AND lang = '" . $user->lang['USER_LANG']."'");
  }
  $sql = "SELECT TRIM(term) AS term, description, long_desc FROM " . LEXICON_TABLE . $where . " ORDER BY term";
echo "sql = $sql";
  if( !$result = $db->sql_query($sql) )

=


http://oleronature.ovh.org/test/lexicon.php?letter=G&


Code: Select all

sql = SELECT TRIM(term) AS term, description, long_desc FROM phpbb3_lexicon WHERE term LIKE 'G%' AND lang = 'fr-standard' ORDER BY term[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3617: Cannot modify header information - headers already sent by (output started at /lexicon.php:67)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3619: Cannot modify header information - headers already sent by (output started at /lexicon.php:67)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3620: Cannot modify header information - headers already sent by (output started at /lexicon.php:67)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3621: Cannot modify header information - headers already sent by (output started at /lexicon.php:67)

reh
Registered User
Posts: 66
Joined: Mon Jun 28, 2004 7:55 am

Re: [ALPHA] Lexicon / Acronym MOD

Post by reh »

The generated sql command looks correct and also your page seems to work correct.
So you problem is solved (dont know, why - do you have changed anything else?)

Locked

Return to “[3.0.x] Abandoned MODs”