Welcome, Guest. Please Login or Register.
November 25, 2024, 11:22:35 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.1] After Post « previous next »
Pages: 1 [2] 3 Reply Ignore Print
Author Topic: [Done 1.5.1] After Post  (Read 8205 times)
Fizzy
Full Member
***
Posts: 214


Re:[Beta 1.5.1] After Post
« Reply #15 on: March 20, 2003, 07:22:29 AM »
Reply with quote

Not a problem Gobalopper ;)

Glad to help 8)
Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.5.1] After Post
« Reply #16 on: March 31, 2003, 09:31:49 PM »
Reply with quote

Bugs. Say, where are you getting this variable from? ($settings['returnToPost'] == '0').. That should be
if ($modSettings['returnToPost'] == '0') instead. Your mod always gives the users the option menu because of this flaw.

Now, change that and they get taken back to the index, everytime, and no matter where their settings are for this mod. I believe that is because you are not setting your form choice variable in member db. It consistantly returns back to value 0.  

My Supermod users are screaming at me about this.. :)
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Beta 1.5.1] After Post
« Reply #17 on: March 31, 2003, 10:21:29 PM »
Reply with quote

Quote from: Wiziwig on March 31, 2003, 09:31:49 PM
Bugs. Say, where are you getting this variable from? ($settings['returnToPost'] == '0').. That should be
if ($modSettings['returnToPost'] == '0') instead. Your mod always gives the users the option menu because of this flaw.

Now, change that and they get taken back to the index, everytime, and no matter where their settings are for this mod. I believe that is because you are not setting your form choice variable in member db. It consistantly returns back to value 0.  

My Supermod users are screaming at me about this.. :)


Perhaps you misunderstand, Wiziwig.

I just took a look at the entire mod, and it's right as rain.  Nowhere in the mod does it have $settings['returnToPost'], it only uses 'afterPost', and that is on the memebrs table not the settings table - that is, it's in $settings not $modSettings.

You can set this in your profile..... so it looks from the mod file.

-[Unknown]
Logged
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #18 on: March 31, 2003, 10:56:00 PM »
Reply with quote

It uses $settings because it is loading that value from the members table not the mod settings.
There is no mod settings for this mod because the user controls where they want to be redirected not the admin.
Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.5.1] After Post
« Reply #19 on: March 31, 2003, 10:57:18 PM »
Reply with quote

Yes and No and your partially right. the original code is if ($settings[24] == '0'), karmaSmiteLabel ????? ok, lets change that.. elseif ($settings['afterPost'] == '1') ok now this should work.. my bad, I posted something else from my tinkering.. now.. made post.. takes me to the option menu.. no this should not be..  look in my profile.. defaulted to back to post..  ok, so why" hmm.. change that.. dont change.. go back and its back where it was..  ok so the later half my reply was correct anyway.. I corrected to what you pointed out as you see.. still the same problem. its defaulting to back to post in profile and its taking you to the option menu when it shouldnt be..


Quote from: [Unknown
Perhaps you misunderstand, Wiziwig.

I just took a look at the entire mod, and it's right as rain.  Nowhere in the mod does it have $settings['returnToPost'], it only uses 'afterPost', and that is on the memebrs table not the settings table - that is, it's in $settings not $modSettings.

You can set this in your profile..... so it looks from the mod file.
-[Unknown]
Quote
Logged

Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #20 on: March 31, 2003, 11:05:19 PM »
Reply with quote

Does the supermod change the $settings variable at all? My guess is your supermod is adding extra selects to the query for $settings and you aren't offsetting that value elsewhere.
Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.5.1] After Post
« Reply #21 on: April 01, 2003, 02:25:52 AM »
Reply with quote

Let me see,. I have 25 select querys, 1 to 25 or as we look at it, 0 to 24...

function LoadUserSettings()

SELECT passwd, realName, emailAddress, websiteTitle, websiteUrl, signature, posts, memberGroup, ICQ, AIM, YIM, gender, personalText, avatar, dateRegistered, location, birthdate, timeFormat, timeOffset, hideEmail, ID_MEMBER, memberName, MSN, lngfile, afterPost

And your mod has 25 select querys.. So no, that's the problem.. I would like to note though, as a insurance that this would never be a problem, I should be able to use column name instead of column number. I think its presumptious of us to be building these variable assignments off of column numbers, as those can be changed.

So,. regardless if I use $settings[24] or if I use $settings[afterPost] I am getting the same results.

Any other thought provoking ideals you could throw my way??


Quote from: Gobalopper on March 31, 2003, 11:05:19 PM
Does the supermod change the $settings variable at all? My guess is your supermod is adding extra selects to the query for $settings and you aren't offsetting that value elsewhere.
Logged

Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #22 on: April 01, 2003, 02:31:44 AM »
Reply with quote

In your previous post you mentioned karmaSmiteLabel, where did that come from?

You should be able to select the column name depending on what mysql_fetch command is used.
Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.5.1] After Post
« Reply #23 on: April 01, 2003, 02:58:52 AM »
Reply with quote

Q1. I dont think I was thinking clearly, the sun was still up :) Silly me I was counting columns from the table instead of from the query.

Q2. what mysql_fetch command ?? Hmm now we have flavors? :)  Elighten me with an example of your infinite wisdom, I dont think it'll help me with this problem but it's well worth adding these tidbits to the knowledge base. . :)

Quote from: Gobalopper on April 01, 2003, 02:31:44 AM
In your previous post you mentioned karmaSmiteLabel, where did that come from?

You should be able to select the column name depending on what mysql_fetch command is used.
« Last Edit: April 01, 2003, 03:02:12 AM by Wiziwig » Logged

Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #24 on: April 01, 2003, 03:09:08 AM »
Reply with quote

mysql_fetch_row and mysql_fetch_array return different arrays. So depending on which is used you may not be able to use ['somename'] when refering to an array.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Beta 1.5.1] After Post
« Reply #25 on: April 01, 2003, 03:22:04 AM »
Reply with quote

To explain further,

mysql_fetch_row returns a numerically indexed array, best for lists.... ie.

list ($col1, $col2, $col3) = mysql_fetch_row($result);

mysql_fetch_assoc returns an associative array, best for direct usage.... ie.

$row = mysql_fetch_assoc($result);
echo $row['memberName'];

mysql_fetch_array does both.... for example:

$result = mysql_query("
  SELECT 1 AS hi, 2 AS hello, 3 AS bye");
$row = mysql_fetch_array($result);
print_r($row);

Will produce:
Array (
  [ 0] => 1
  [hi] => 1
  [1] => 2
  [hello] => 2
  [2] => 3
  [bye] => 3
)

mysql_fetch_array is *somewhat* slower, due to having to do both.  It is best to use the one best for the situation instead.

-[Unknown]
« Last Edit: April 01, 2003, 03:42:57 AM by [Unknown] » Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.5.1] After Post
« Reply #26 on: April 01, 2003, 03:32:45 AM »
Reply with quote

Oh but it's my understanding you can use [columnname] in an array if you use explode or if you compare, like this:
while ($row = mysql_fetch_array($request))
{ $aname = $row['columnname'];

True? Anyrate, back to my problem.. Any other suggestions? lol look like we both posted at the same time.. :)


Quote from: Gobalopper on April 01, 2003, 03:09:08 AM
mysql_fetch_row and mysql_fetch_array return different arrays. So depending on which is used you may not be able to use ['somename'] when refering to an array.
« Last Edit: April 01, 2003, 03:34:25 AM by Wiziwig » Logged

Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #27 on: April 19, 2003, 08:31:08 AM »
Reply with quote

Updated for the final release of 1.5.1.
Logged
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Done 1.5.1] After Post
« Reply #28 on: May 19, 2003, 08:09:29 PM »
Reply with quote

The variable $settings uses mysql_fetch_row in Load.php. So in order to use ['sometext'] to access what is in it you will need to change $settings to use mysql_fetch_array in Load.php.

So you can either change the way $settings gets set or use numerical indexes. Thats my suggestion. :)
Logged
multikon
Sr. Member
****
Posts: 401


ICQ - 116573999
Re:[Done 1.5.1] After Post
« Reply #29 on: September 10, 2003, 11:44:14 PM »
Reply with quote

*reeeload*  ;D

please make an update for 1.53/1.54  :-X


thx & cya
Logged

MULTIMEDIA-KONSOLEN
BEI FRAGEN ODER PROBLEMEN MIT KONSOLEN, COMPUTERN & MOBILFUNK
Pages: 1 [2] 3 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.1] After Post « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.052 seconds with 20 queries.