[ABD]Advanced Hide Post 1.0.0 (From Sell Post 0.2.1)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
TimeVirus
Registered User
Posts: 125
Joined: Sat Jul 12, 2003 12:17 am

Post by TimeVirus » Sat Nov 01, 2003 6:39 am

Well it's a very complex and large mod to implement, I'm amazed I got it installed without breaking anything that I can find so far. So I wouldn't worry about a couple typos. :) It's a really neat idea, I hope to get it working on my site. Thanks for making it. :)

Aha! That fixed my admin panel text not showing. :) But now the "no" button comes up highlighted, and after I change it to "yes", submit and check, its back to no again.
I'm probably wrong again...

shi
Registered User
Posts: 58
Joined: Fri Sep 12, 2003 7:14 am
Location: Shanghai, China
Contact:

Post by shi » Sat Nov 01, 2003 7:08 am

TimeVirus wrote: Aha! That fixed my admin panel text not showing. :) But now the "no" button comes up highlighted, and after I change it to "yes", submit and check, its back to no again.
  1. Ignoring the result displayed in phpBB, will the allow_sellingpost in table phpbb_config be set sucessesfully when checking with phpMyAdmin?
  2. What can you get if you change this value with phpMyAdmin?

User avatar
TimeVirus
Registered User
Posts: 125
Joined: Sat Jul 12, 2003 12:17 am

Post by TimeVirus » Sat Nov 01, 2003 7:23 am

1. They dont seem related, setting it in admin doesnt alter the database, it always defaults as no in admin.

2. I tried switching it using phpmyadmin and it sets to 1 with no problem. But returning to the admin panel it always showed defaulted to no and the edit newpost didnt show any sell options.

Neither seems to affect the other, but the "no" being defaulted on in admin does seem to prevent me from seeing any signs of the mod yet.
I'm probably wrong again...

ekin_116
Registered User
Posts: 57
Joined: Mon Sep 15, 2003 8:48 am
Location: Philippines
Contact:

Post by ekin_116 » Sat Nov 01, 2003 7:26 am

i can't download these file.....is your site still working......
can you send me via my email: ekin_116@hotmail.com
thanx in advance!!!!!!

User avatar
TimeVirus
Registered User
Posts: 125
Joined: Sat Jul 12, 2003 12:17 am

Post by TimeVirus » Sat Nov 01, 2003 7:35 am

I just noticed you referred to sell_post field in phpbb_config as allow_sellingpost. Maybe that's the problem. In my database its labeled sell_post.
I'm probably wrong again...

User avatar
TimeVirus
Registered User
Posts: 125
Joined: Sat Jul 12, 2003 12:17 am

Post by TimeVirus » Sat Nov 01, 2003 7:46 am

Ok I changed the name to allow_sellpost in database and the admin panel is working now. :)

So I tried a test post and got this error:

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 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 '5) VALUES (260, 16, 2, '', 1067672626, '04410512', 1, 1, 1, 1)'

INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, 5) VALUES (260, 16, 2, '', 1067672626, '04410512', 1, 1, 1, 1)

Line : 284
File : /home/timedi2/public_html/forum/includes/functions_post.php
I'm probably wrong again...

shi
Registered User
Posts: 58
Joined: Fri Sep 12, 2003 7:14 am
Location: Shanghai, China
Contact:

Post by shi » Sat Nov 01, 2003 7:54 am

TimeVirus wrote: I just noticed you referred to sell_post field in phpbb_config as allow_sellingpost. Maybe that's the problem. In my database its labeled sell_post.

I see, that's the point. To have a similar format as the other options I modified the field name in my database. Unfortunately I forgot to update the mod files. Thanks a lot!

shi
Registered User
Posts: 58
Joined: Fri Sep 12, 2003 7:14 am
Location: Shanghai, China
Contact:

Post by shi » Sat Nov 01, 2003 8:20 am

Oh, my God! I lost some codes again.
Replace the actions in includes/functions_post.php with the following

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]------------------------------------------
#
	function submit_post($mode

#
#-----[ IN-LINE FIND ]------------------------------------------
#
)

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, &$post_price

#
#-----[ FIND ]------------------------------------------
#
	$sql = ($mode != "editpost")

#
#-----[ IN-LINE FIND ]------------------------------------------
#
enable_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, selling_price

#
#-----[ IN-LINE FIND ]------------------------------------------
#
$attach_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $post_price

#
#-----[ IN-LINE FIND ]------------------------------------------
#
enable_sig = $attach_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, selling_price = $post_price

#
#-----[ FIND ]------------------------------------------
#
function delete_post(

#
#-----[ FIND ]------------------------------------------
#
if ($post_data['last_post'])

#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Sell Post MOD
$sql = "DELETE FROM " . PAYMENT_TABLE . " 
	WHERE post_id = $post_id";
if (!$db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Error in deleting post\'s payment information', '', __LINE__, __FILE__, $sql);
}
What is it now?
TimeVirus wrote: Ok I changed the name to allow_sellpost in database and the admin panel is working now. :)

So I tried a test post and got this error:

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 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 '5) VALUES (260, 16, 2, '', 1067672626, '04410512', 1, 1, 1, 1)'

INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, 5) VALUES (260, 16, 2, '', 1067672626, '04410512', 1, 1, 1, 1)

Line : 284
File : /home/timedi2/public_html/forum/includes/functions_post.php

danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 » Sat Nov 01, 2003 9:26 am

theres a few lines of code missing from the installer as well :)

it goes

Find
BLA BLA

then

FIND


there was no add or anything

User avatar
TimeVirus
Registered User
Posts: 125
Joined: Sat Jul 12, 2003 12:17 am

Post by TimeVirus » Sat Nov 01, 2003 9:39 am

No more sql errors. :) Did a test post for 5 whatever money. Then used a test account with enough money, tried to read and was told not enough money.

A nice addition would be if it also had text for the money unit it was using both in edit post and in read post. Example 5 "dollars" or whatever user_points is called on each board.
I'm probably wrong again...

shi
Registered User
Posts: 58
Joined: Fri Sep 12, 2003 7:14 am
Location: Shanghai, China
Contact:

Post by shi » Sat Nov 01, 2003 10:44 am

danb00 wrote: theres a few lines of code missing from the installer as well :)

it goes

Find
BLA BLA

then

FIND


there was no add or anything

One is the mistake I made as mentioned in my post earlier (below the second quoted box).

The others is to ensure that user can find the correct position because there are some similar codes in the same file. I didn't find a better way to distinguish them.

shi
Registered User
Posts: 58
Joined: Fri Sep 12, 2003 7:14 am
Location: Shanghai, China
Contact:

Post by shi » Sat Nov 01, 2003 10:57 am

TimeVirus wrote: No more sql errors. :) Did a test post for 5 whatever money. Then used a test account with enough money, tried to read and was told not enough money.

A nice addition would be if it also had text for the money unit it was using both in edit post and in read post. Example 5 "dollars" or whatever user_points is called on each board.

Are you using Points MOD or Cash MOD? If it's the former, have you changed the field name to user_points in the constants.php?
What I wrote in the MOD is

Code: Select all

define('CASH_FIELD_NAME', 'user_cash');
If you're using points mod, it sould be

Code: Select all

define('CASH_FIELD_NAME', 'user_points');
I thought that was mentioned in the Author Notes.

You may add the unit by modifying the messages added into lang_main.php if you are using single currency in your forum. But with Cash MOD, there may be two or even more currencies in a forum. I have no idea to make my MOD get the proper unit name in such a system.

shi
Registered User
Posts: 58
Joined: Fri Sep 12, 2003 7:14 am
Location: Shanghai, China
Contact:

Post by shi » Sat Nov 01, 2003 12:44 pm

ekin_116 wrote: i can't download these file.....is your site still working......
can you send me via my email: ekin_116@hotmail.com
thanx in advance!!!!!!

I have send one which has been fixed for the known bugs till now to your mail. Please check your mail box.

User avatar
TimeVirus
Registered User
Posts: 125
Joined: Sat Jul 12, 2003 12:17 am

Post by TimeVirus » Sat Nov 01, 2003 4:50 pm

I am using Xores cash mod. He uses "user_points" as default for first currency so when I switched it to read:

Code: Select all

define('CASH_FIELD_NAME', 'user_points');
The buy post started working. Doing more testing today, seems to be all working at this point though. :)
I'm probably wrong again...

kolczyk
Registered User
Posts: 73
Joined: Sat Dec 14, 2002 8:57 pm

Post by kolczyk » Sat Nov 01, 2003 5:05 pm

shi, please send to me fixed version: elektroda@elektroda.pl

Locked

Return to “[2.0.x] MODs in Development”