Advertisement:

Author Topic: MyStatus Update Mod (beta) - a social network extension for SMF 2.0  (Read 33756 times)

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #100 on: November 15, 2009, 12:55:25 PM »
Is there a demo?

Not yet, I'm rewriting it's core code due to concerns from the customizer team.
It'll be a few more days till I get the last few bugs worked out.

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #101 on: November 15, 2009, 03:28:27 PM »
I'm at a little bit of a stuck point.
How is $topic populated in Post2?

Offline sangwe11

  • Full Member
  • ***
  • Posts: 680
  • The Pirate, Arrr!
    • sangwe11's Code Dump
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #102 on: November 15, 2009, 03:34:40 PM »
I'm at a little bit of a stuck point.
How is $topic populated in Post2?

I thought you had dropped using the topics / posts ?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #103 on: November 15, 2009, 03:56:55 PM »
It's actually done the same way it is throughout the rest of SMF, by looking in $_REQUEST['topic'].
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #104 on: November 15, 2009, 04:03:41 PM »
I'm at a little bit of a stuck point.
How is $topic populated in Post2?

I thought you had dropped using the topics / posts ?

In a forum board, I did.
But this mod acts almost identically to how topics and replies are done. So it would make logical sense to look at how topics and replies are posted, to get ideas on how to do it elsewhere.

Or no?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #105 on: November 15, 2009, 04:08:42 PM »
It's actually done the same way it is throughout the rest of SMF, by looking in $_REQUEST['topic'].
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #106 on: November 15, 2009, 04:13:32 PM »
It's actually done the same way it is throughout the rest of SMF, by looking in $_REQUEST['topic'].

The issue I'm having is...
OK, first you need so insight on what I did.
Basically, I grabbed the code from post2 and sub-post, since that was how I had this mod doing it before this huge change to it's own tables. That code now resides in it's own independent Source files. Index.php has been updated, and the forms have been updated. The new tables are also in the database as needed.

OK, now I can post a new topic (status update), that works as needed and returns me to the everyone page.
I can reply to ONE new topic, but every other new topic I try to reply to gives me this message...
"The topic or board you are looking for appears to be either missing or off limits to you."

But I can still reply to the one new topic that I successfully replied to the first time.

Unfortunatly I am having a huge problem figuring out where the issue is.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #107 on: November 15, 2009, 04:25:13 PM »
If you're using $topic directly (which is a bad idea), it's defined in index.php during page load, directly from $_REQUEST.

I still don't know enough about what you're doing and how you're trying to do it.

What URL are you trying to access when you get that error?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #108 on: November 15, 2009, 10:05:58 PM »
If you're using $topic directly (which is a bad idea), it's defined in index.php during page load, directly from $_REQUEST.

I still don't know enough about what you're doing and how you're trying to do it.

What URL are you trying to access when you get that error?

It's a custom url and I'm working it all custom files at this point.
I have the issue rounded down to the fact that it only errors out on the first reply to a post.
I can post in any update already replied to, but if the update is new, it throws the error.

I'm still working on it.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #109 on: November 15, 2009, 10:08:27 PM »
Then there's some faulty logic in your code somewhere if you're completely in a custom action.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #110 on: November 15, 2009, 10:39:17 PM »
If you're using $topic directly (which is a bad idea), it's defined in index.php during page load, directly from $_REQUEST.


Your advice was what I needed.
I was using $topic, which was a bad idea.
I switched that to $update and $_REQUEST['update'] and that damn near fixed the problem.

Thanks!!
After a few other minor tweaks, I have it functional now, and fully independent from SMF boards, database tables, and coding.

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #111 on: November 15, 2009, 10:47:28 PM »
Then there's some faulty logic in your code somewhere if you're completely in a custom action.

LOL, :P rub it in why don't you :P

Hey, nice Code Monkey logo you have there.
Is that new? I haven't noticed it before.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #112 on: November 16, 2009, 03:42:43 AM »
LOL, :P rub it in why don't you :P

That wasn't what I was on about; simply that if you're using a custom action and not calling SMF functions, process of elimination says it's your custom code.

Quote
Hey, nice Code Monkey logo you have there.
Is that new? I haven't noticed it before.

I switched my avatar to that yesterday. I'm feeling in a slightly frivolous mood, so will change my avatar around occasionally; I have a couple of others to run with yet...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #113 on: November 17, 2009, 10:01:06 PM »
What are all the parameters for $config_vars?
I can't find any documentation on it anywhere.

I looked at other mods to get an idea, but I don't exactly know what ALL the parameters are. Especially this last one.... ,'',
Code: [Select]
<?php

array('text''mystatus_update_txt','32','label' => $txt['mystatus_update_txt'], 'subtext' => $txt['mystatus_update_txt2']),'',

?>

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #114 on: November 17, 2009, 11:50:44 PM »
I figured out the ,'', at the end, it's actually outside of the setting array, and somehow creates a <hr /> between settings.

I would still like to know the full range of options available for $config_vars if anyone knows where that info can be found.

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #115 on: November 18, 2009, 12:35:22 AM »
Take a look in ManageServer.php for that.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #116 on: November 18, 2009, 03:56:24 AM »
Parameters for $config_vars, by and large it's an array of arrays, with the subarrays being 2+ items, the first being the type of option (text, large_text, check, int, float), the second being the name of the entry in $txt and $modSettings that it needs to be.

size is used to dictate the size of the box, label is the text label it gets if you don't want to use the default auto populated one, subtext is a sub label it has.

You can simply define it as ('text', 'settingname') to have it saved into $modSettings['settingname'], use $txt['settingname'] and be a basic textbox.

The '' is not outside of the settings array, actually. The array is an array of arrays, really, with one array containing all the settings and each setting being an array or string (default label, not recommended), or '' for divider.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline digit

  • Sophist Member
  • *****
  • Posts: 1,364
  • Gender: Male
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #117 on: November 18, 2009, 04:20:36 AM »
Looking forward to the update!  8)
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #118 on: November 18, 2009, 11:10:24 AM »
Take a look in ManageServer.php for that.

Yup, there are a bunch of good examples of $config_vars there in that file
Here's one of them....
(< ?php is added just to make it colorful :P
Code: [Select]
<?php
/* If you're writing a mod, it's a bad idea to add things here....
For each option:
variable name, description, type (constant), size/possible values, helptext.
OR an empty string for a horizontal rule.
OR a string for a titled section. */
$config_vars = array(
array('mbname'$txt['admin_title'], 'file''text'30),
'',
array('maintenance'$txt['admin_maintain'], 'file''check'),
array('mtitle'$txt['maintenance_subject'], 'file''text'36),
array('mmessage'$txt['maintenance_message'], 'file''text'36),
'',
array('webmaster_email'$txt['admin_webmaster_email'], 'file''text'30),
'',
array('enableCompressedOutput'$txt['enableCompressedOutput'], 'db''check'null'enableCompressedOutput'),
array('disableTemplateEval'$txt['disableTemplateEval'], 'db''check'null'disableTemplateEval'),
array('disableHostnameLookup'$txt['disableHostnameLookup'], 'db''check'null'disableHostnameLookup'),
);
?>


Offline ElectricSquid

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
  • Forging a forum with blood, sweat, and steel
    • RedneckFabrication.com ...rebuilding the world with Scrap Steel, Duct Tape, & Bailing Wire
Re: MyStatus Update Mod (beta) - a social network extension for SMF 2.0
« Reply #119 on: November 18, 2009, 11:16:13 AM »
... and I'm going to take a wild guess at it here, I'm guessing that the Help file text that can be added to the $config_vars array should be located in Help.english.php?