Welcome, Guest. Please Login or Register.
November 25, 2024, 11:17:17 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 8204 times)
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
[Done 1.5.1] After Post
« on: March 17, 2003, 09:51:39 AM »
Reply with quote

This mod gives users the choice of where they are taken after posting. The options are back to post, back to message index or ask me each time.

http://www.dune2k.com/yabbse/AfterPost.zip
« Last Edit: July 27, 2003, 04:30:21 AM by Gobalopper » Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.5.1] After Post
« Reply #1 on: March 17, 2003, 01:35:21 PM »
Reply with quote

Your db add file is not correct. Here's the correct format if you want it, I know you don't :) oops my bad thats not correct either lol..  er brb maybe :).. Ok now I got it lol, gotta learn there are a difference between a tilde and a apostrophie!


$result = mysql_query("ALTER TABLE `{$db_prefix}members` ADD afterPost tinyint(4) NOT NULL default '0'");
if(!$result) {
   echo "<font color=red>Error updating the DB. SQL Error: ".mysql_error()."</font><BR>";
   $error++;}
else
echo "<font color=green>Data inserted!</font><BR>";



« Last Edit: March 17, 2003, 01:42:30 PM by Wiziwig » Logged

Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:[Beta 1.5.1] After Post
« Reply #2 on: March 17, 2003, 04:27:20 PM »
Reply with quote

maybe you should add a meta tag to redirect the user automatically somewhere after x seconds...
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #3 on: March 17, 2003, 09:41:40 PM »
Reply with quote

Wiziwig thats the format I use for all my mods, does it not work?

Spiff are you talking using that for the let me choose option?
Logged
Wistman
Jr. Member
**
Posts: 84


I'm a llama!

Re:[Beta 1.5.1] After Post
« Reply #4 on: March 17, 2003, 11:21:34 PM »
Reply with quote

I'd say he is most of the boards I've seen with a similar idea will ask the question and then after about 5 - 10 secs take you back to the post.

nice idea but I'll wait a couple of days in case you add that bit of script
Logged
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #5 on: March 18, 2003, 12:11:20 AM »
Reply with quote

It would have to be added to your template.php file actually. Similar to how its done with the Who's Online mod I did.
Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.5.1] After Post
« Reply #6 on: March 18, 2003, 09:47:38 AM »
Reply with quote

Well, not like you have it now no, least it shouldn't!: :) |
                                                                                       |
                                                                                       V

$result = mysql_query("ALTER TABLE {$db_prefix}yabb_members ADD afterPost tinyint(4) NOT NULL default '0'");



Quote from: Gobalopper on March 17, 2003, 09:41:40 PM
Wiziwig thats the format I use for all my mods, does it not work?
« Last Edit: March 18, 2003, 09:50:15 AM by Wiziwig » Logged

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


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #7 on: March 18, 2003, 08:33:33 PM »
Reply with quote

Ah right, doh. :)

Uploaded a fixed zip file.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:[Beta 1.5.1] After Post
« Reply #8 on: March 18, 2003, 10:38:23 PM »
Reply with quote

Quote from: Gobalopper on March 17, 2003, 09:41:40 PM
Spiff are you talking using that for the let me choose option?

i mean as a default option to redirect somewhere if a user didnt choose in x secs
:)
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
1979Z28
Sr. Member
****
Posts: 324


WWW
Re:[Beta 1.5.1] After Post
« Reply #9 on: March 19, 2003, 12:02:43 AM »
Reply with quote

I'm betting that they mean something similar that phpBB does. After posting a message somewhere, if the user doesn't click one of the links in X seconds, then redirect them to XX page. Seems like a pretty good idea to me, :P Maybe redirect them to the post they just made, after 5 seconds, by default? ;)
Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.5.1] After Post
« Reply #10 on: March 19, 2003, 12:35:46 AM »
Reply with quote

I wish I could get it to work, but something else is interfering.. I think it might be redirection stuff but I dont know. Cant promise it'll join the hall of Supermod of fame list..
Logged

Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:[Beta 1.5.1] After Post
« Reply #11 on: March 19, 2003, 04:23:43 AM »
Reply with quote

Quote from: 1979Z28 on March 19, 2003, 12:02:43 AM
I'm betting that they mean something similar that phpBB does. After posting a message somewhere, if the user doesn't click one of the links in X seconds, then redirect them to XX page. Seems like a pretty good idea to me, :P Maybe redirect them to the post they just made, after 5 seconds, by default? ;)

exactly :)
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #12 on: March 19, 2003, 04:53:08 AM »
Reply with quote

Thats what I meant too. :)
Logged
Fizzy
Full Member
***
Posts: 214


Re:[Beta 1.5.1] After Post
« Reply #13 on: March 19, 2003, 09:19:27 PM »
Reply with quote

Well I'm afraid it didn't work for me.
The profile wasn't being updated in the database plus it clashed with Quickreply Mod.

So I did a tweak here and there and found that Profile.php seemed a bit light on code ? ? ? ???

replaced

         SET $queryPasswdPart $customTitlePart realName='$member[name]', emailAddress='$member[email]', websiteTitle='$member[websitetitle]', websiteUrl='$member[websiteurl]', signature='$member[signature]', posts=$member[settings6], memberGroup='$member[settings7]', ICQ='$member[icq]', MSN='$member[msn]', AIM='$member[aim]', YIM='$member[yim]', gender='$member[gender]', personalText='$member[usertext]', avatar='$member[userpic]', birthdate='$member[bday]', lngfile='$member[language]', " . ($username == $member['user'] ? "memberIP='$memIP', " : '') . "timeFormat='$member[usertimeformat]', timeOffset=$timeOffest,  secretQuestion='$member[secretQuestion]', secretAnswer='$member[secretAnswer]', hideEmail=$hideEmail$karmaStr


with

         SET $queryPasswdPart $customTitlePart realName='$member[name]', emailAddress='$member[email]', websiteTitle='$member[websitetitle]', websiteUrl='$member[websiteurl]', signature='$member[signature]', posts=$member[settings6], memberGroup='$member[settings7]', ICQ='$member[icq]', MSN='$member[msn]', AIM='$member[aim]', YIM='$member[yim]', gender='$member[gender]', personalText='$member[usertext]', avatar='$member[userpic]', birthdate='$member[bday]', lngfile='$member[language]', " . ($username == $member['user'] ? "memberIP='$memIP', " : '') . "timeFormat='$member[usertimeformat]', timeOffset=$timeOffest, afterPost='$member[afterPost]', secretQuestion='$member[secretQuestion]', secretAnswer='$member[secretAnswer]', hideEmail=$hideEmail$karmaStr


and

replaced

function ModifyProfile ()
{
   global $user, $username, $txt, $yytitle, $settings, $img, $cgi, $scripturl, $timeformatstring, $color, $imagesdir;
   global $GenderMale, $GenderFemale, $allowpics, $facesdir, $userpic_limits, $facesurl, $allow_hide_email, $boarddir, $userpic_width, $userpic_height;
   global $MaxSigLen, $timeformatstring, $db_prefix, $locale, $modSettings, $language, $timeoffset;


with

function ModifyProfile ()
{
   global $user, $username, $txt, $yytitle, $settings, $img, $cgi, $scripturl, $timeformatstring, $color, $imagesdir;
   global $GenderMale, $GenderFemale, $allowpics, $facesdir, $userpic_limits, $facesurl, $allow_hide_email, $boarddir, $userpic_width, $userpic_height;
   global $MaxSigLen, $timeformatstring, $db_prefix, $locale, $modSettings, $language, $timeoffset, $afterPost;
[quote][/quote]

I'm no expert, I just know this works on mine.
Question though, without the first change I made, how would the prfile have been updated in the database ?
« Last Edit: March 19, 2003, 09:20:16 PM by Fizzy » Logged
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.5.1] After Post
« Reply #14 on: March 20, 2003, 05:26:02 AM »
Reply with quote

Thanks Fizzy turns out I was missing the update part. :)

Should be included in the zip now.
Logged
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.065 seconds with 20 queries.