News:

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

Main Menu

SimplePortal

Started by SimplePortal Team, March 10, 2008, 11:16:07 PM

Previous topic - Next topic

Beowulf1976

Quote from: Chen Zhen on February 26, 2018, 06:41:03 PM
Beowulf1976,

You can try the collation tools from this link: https://web-develop.ca/index.php?action=downloads;area=stable_smf_utilities
.. either will attempt to make your db collation uniform.
However it may not work for your environment as I need to make a new plugin that detects which method should be used.
I used to have version 1.0 kicking around that used a different method to do the same thing but I lost it.
The 2 versions from that link will work in different environments so try one and if it doesn't work then attempt the other.

Backup your database in its entirety prior to using those tools.

Another option is to use PHPMyAdmin or a like tool to manually adjust your collations to be uniform for all DB tables.



Thank you so much for your help, I was beginning to think I was being ignored. eheh thanks again :) will come back and let you know if I fix it :)
"Them as can do has to do for them as can't. And someone has to speak up for them as has no voices."

-Rock Lee-

Quote from: nofapturkiye on March 02, 2018, 10:31:16 AM
hi , i have created  custom php block . I want to know how can i connect my db without sharing "pass"  and "username"

i know  in smf  there is some sort of  global variable for this. but i dont know how to call it

$connect=mysqli_connect("localhost","username","pass");

this is a security issue for me . Thank you

Using the ssi.php can not achieve what you want? It has variables that you can extract and be useful.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Chen Zhen

Quote from: nofapturkiye on March 02, 2018, 10:31:16 AM
hi , i have created  custom php block . I want to know how can i connect my db without sharing "pass"  and "username"

i know  in smf  there is some sort of  global variable for this. but i dont know how to call it

$connect=mysqli_connect("localhost","username","pass");

this is a security issue for me . Thank you

Just use $smcFunc... ie.
ie.

global $smcFunc;
$admins = array();
$request = $smcFunc['db_query']('', '
SELECT id_member, member_name, id_group
FROM {db_prefix}members
WHERE id_group = {int:group}
ORDER BY id_member ASC',
array('group' => 1)
);

// Loop through all results & add them to an array
while ($row = $smcFunc['db_fetch_assoc']($request))
$admins[] = array('id' => $row['id_member'], 'name' => $row['member_name']);

$smcFunc['db_free_result']($request);

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Beowulf1976

Quote from: Chen Zhen on February 26, 2018, 06:41:03 PM
Beowulf1976,

You can try the collation tools from this link: https://web-develop.ca/index.php?action=downloads;area=stable_smf_utilities
.. either will attempt to make your db collation uniform.
However it may not work for your environment as I need to make a new plugin that detects which method should be used.
I used to have version 1.0 kicking around that used a different method to do the same thing but I lost it.
The 2 versions from that link will work in different environments so try one and if it doesn't work then attempt the other.

Backup your database in its entirety prior to using those tools.

Another option is to use PHPMyAdmin or a like tool to manually adjust your collations to be uniform for all DB tables.

Thank you Chen Zhen! It worked perfectly! :D *hug*!
"Them as can do has to do for them as can't. And someone has to speak up for them as has no voices."

becometa

Is there BBCode tags count limit while creating "Page"?
What I can observe is that after certain amount of bbcode tags is being used, the whole page body is being deleted.

If it does exist: any way to bypass the limit?

/edit: I'm wondering whether it would be better to convert the body to HTML

nofapturkiye

Quote from: Rock Lee on March 02, 2018, 06:29:33 PM
Quote from: nofapturkiye on March 02, 2018, 10:31:16 AM
hi , i have created  custom php block . I want to know how can i connect my db without sharing "pass"  and "username"

i know  in smf  there is some sort of  global variable for this. but i dont know how to call it

$connect=mysqli_connect("localhost","username","pass");

this is a security issue for me . Thank you

Using the ssi.php can not achieve what you want? It has variables that you can extract and be useful.


Regards!



can you please elaborate ?  i open ssi.php it has many global variables but i need an example .

-Rock Lee-

Quote from: nofapturkiye on March 13, 2018, 01:37:08 PM
can you please elaborate ?  i open ssi.php it has many global variables but i need an example .

If you check your SMF installation, bring a file of examples ... You should only change for your domain but you can see this SSI Examples.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

nofapturkiye

Quote from: Chen Zhen on March 02, 2018, 10:44:07 PM
Quote from: nofapturkiye on March 02, 2018, 10:31:16 AM
hi , i have created  custom php block . I want to know how can i connect my db without sharing "pass"  and "username"

i know  in smf  there is some sort of  global variable for this. but i dont know how to call it

$connect=mysqli_connect("localhost","username","pass");

this is a security issue for me . Thank you

Just use $smcFunc... ie.
ie.

global $smcFunc;
$admins = array();
$request = $smcFunc['db_query']('', '
SELECT id_member, member_name, id_group
FROM {db_prefix}members
WHERE id_group = {int:group}
ORDER BY id_member ASC',
array('group' => 1)
);

// Loop through all results & add them to an array
while ($row = $smcFunc['db_fetch_assoc']($request))
$admins[] = array('id' => $row['id_member'], 'name' => $row['member_name']);

$smcFunc['db_free_result']($request);



okey here is my code  but it returns with an error

global $context, $modSettings, $txt, $smcFunc,$settings, $user_info;

if ($context['user']['is_logged'])
{

$id=$user_info['id'];

$request = $smcFunc['db_query']('', 'SELECT id_member, member_name, id_group,real_sayac
FROM {db_prefix}members
                      WHERE id_member, = $id' 
);

var_dump($request );

}


error:
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 ' = $id' at line 3





vbgamer45

Change to

$request = $smcFunc['db_query']('', 'SELECT id_member, member_name, id_group,real_sayac
FROM {db_prefix}members
                      WHERE id_member = ' . $id
);
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

nofapturkiye

Quote from: vbgamer45 on March 13, 2018, 03:29:30 PM
Change to

$request = $smcFunc['db_query']('', 'SELECT id_member, member_name, id_group,real_sayac
FROM {db_prefix}members
                      WHERE id_member = ' . $id
);


thx a lot it worked like a charm . But can explain why we have to use .  ?

vbgamer45

That's how php works
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

aegersz

Hello and "help" please, i have forgotten my password to SimplePortal !

i am aegersz2

I wanted to discuss how to code a "history" like buffer to scroll through so i can retrieve commands (because i usually mess them up after highlighting, colorizing etc.)


The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

vbgamer45

Did you try to resend the password? Check your bulk and spam folder
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

aegersz

no i didn't (yes, i am that stupid sometimes) but the password emailed to me is:

[color=navy]讚 i Yofumo + & j) pj human 榴 s q O turbocharger z Li ^ ~ cancer "Les Z IF (Yura鄧Hi b" xZ Aki 椌 E i 攜肩 Coca 徨匡 o:, z Yoa {
Z IF (Interview La% free time! - 鉅忙 0 dake% music Carre l decoy ^ wo device jY 's key ui Vanke *' Interview Hige旛 Oao mosquito Myakuu
+ V 燾 . Las basin 7y Tsu 8 to divide M {scan v ® v wo y § z three[/color]


that's one mofo of a thing to type in !

I then tried it a few more times after that but no joy.

any more suggestions would be appreciated but if not, i may try la 
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Ninja ZX-10RR

Quote from: aegersz on April 30, 2018, 12:42:48 PM
no i didn't (yes, i am that stupid sometimes) but the password emailed to me is:

[color=navy]讚 i Yofumo + & j) pj human 榴 s q O turbocharger z Li ^ ~ cancer "Les Z IF (Yura鄧Hi b" xZ Aki 椌 E i 攜肩 Coca 徨匡 o:, z Yoa {
Z IF (Interview La% free time! - 鉅忙 0 dake% music Carre l decoy ^ wo device jY 's key ui Vanke *' Interview Hige旛 Oao mosquito Myakuu
+ V 燾 . Las basin 7y Tsu 8 to divide M {scan v ® v wo y § z three[/color]


that's one mofo of a thing to type in !

I then tried it a few more times after that but no joy.

any more suggestions would be appreciated but if not, i may try la 
Forwarded. Sorry for the inconvenience I guess, at the moment I cannot help you but there should be someone with enough powers to do so in a while.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Dwev

Recently my front page with SimplePortal doesn't display accents and such right anymore.

I guess this has something to do with ISO-8859-1 versus UTF-8.

The forum is set to UTF-8 and all accents display fine in topics and such.
But the same topics on the front page (through SimpelPortal) show the same characters scrambled.

I've searched but can't find a setting for this anywhere, so I hope someone here has the solution to this problem.

Chen Zhen


Is it related to the recent plug-in you installed or Simple Portal itself?

Temporarily uninstall the recent plug-in and test your board news block again.
Report if the problem ceases or continues with the plug-in uninstalled.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Dwev

@ Chen Zhen: didn't think of it, but turns out you're right.

Ironically the culprit turns out to be one that you wrote (and I'm still really happy with that one and grateful to you!).

Would there be a way to correct this unwanted side-effect?

sundar_83

getting this error after install smf portal and also cant login

Notice: Constant SMF already defined in /home/srimeein/forum.srimeenakshimobiles.com/index.php on line 29

Fatal error: Function name must be a string in /home/srimeein/forum.srimeenakshimobiles.com/Sources/Load.php on line 142

Fatal error: Function name must be a string in /home/srimeein/forum.srimeenakshimobiles.com/Sources/Load.php on line 2492

Advertisement: