Jump to content

Pay to Pin Topics

Featured Replies

  • Author
4 hours ago, ahc said:

Er, I'm not sure if a log would be present for my specific issue?  It's just about the button not reappearing when an invoice expires.

If it’s not running for yiu, then something should be logged in System Logs or Error Logs.

Can you provide ACP access? I’ll have to debug in your install. 

Edited by Adriano Faria

  • Replies 81
  • Views 5.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Adriano Faria
    Adriano Faria

    What's New in Version 1.0.2: Added new setting to control how many topics can be pinned in forums (default to NO LIMIT).  

  • Adriano Faria
    Adriano Faria

    What's New in Version 1.0.1: Fix error when adding a new forum.

  • I'm very interested in this. Is there a way to set a limit to how many topics can be pinned in each forum section automatically?  Let's say I only want 5 topics pinned at a time in Forum A and th

Posted Images

7 hours ago, Adriano Faria said:

If it’s not running for yiu, then something should be logged in System Logs or Error Logs.

Can you provide ACP access? I’ll have to debug in your install. 

Yeah no problem. Dawpi is helping me out with something else as well so I’ll need to make a new acc for you both to use when I get home from work. 

  • 5 weeks later...

I am getting an error in the cron and it is in the logs. Is there something that i am missing int he DB?

SELECT * FROM `paytopintopics_topics`  LEFT JOIN `forums_topics` ON paytopintopics_topics.ptpt_topic_id=forums_topics.tid WHERE pinned=1 AND ptpt_status='pinned' AND ptpt_limit<1630680301 ORDER BY tid DESC LIMIT 25
Column 'ptpt_status' in where clause is ambiguous

 

 

#0 /home/skupper/www.bmw2002faq.com/system/Db/Select.php(383): IPS\_Db->preparedQuery('/*ipb_prd::ipdb...', Array, true)
#1 /home/skupper/www.bmw2002faq.com/system/Db/Select.php(577): IPS\Db\_Select->runQuery()
#2 /home/skupper/www.bmw2002faq.com/applications/paytopintopics/tasks/pinRequest.php(42): IPS\Db\_Select->count()
#3 /home/skupper/www.bmw2002faq.com/system/Task/Task.php(367): IPS\paytopintopics\tasks\_pinRequest->IPS\paytopintopics\tasks\{closure}()
#4 /home/skupper/www.bmw2002faq.com/applications/paytopintopics/tasks/pinRequest.php(66): IPS\_Task->runUntilTimeout(Object(Closure))
#5 /home/skupper/www.bmw2002faq.com/system/Task/Task.php(266): IPS\paytopintopics\tasks\_pinRequest->execute()
#6 /home/skupper/www.bmw2002faq.com/system/Task/Task.php(229): IPS\_Task->run()
#7 /home/skupper/www.bmw2002faq.com/applications/core/interface/task/task.php(58): IPS\_Task->runAndLog()
#8 {main}

 

Thanks for the help!

Steve K.

Edited by misfit76

  • Author
On 9/3/2021 at 12:48 PM, misfit76 said:

SELECT * FROM `paytopintopics_topics`  LEFT JOIN `forums_topics` ON paytopintopics_topics.ptpt_topic_id=forums_topics.tid WHERE pinned=1 AND ptpt_status='pinned' AND ptpt_limit<1630680301 ORDER BY tid DESC LIMIT 25
Column 'ptpt_status' in where clause is ambiguous

Not sure how you're getting this error:

	public function execute()
	{
		$this->runUntilTimeout( function()
		{
			$sql = \IPS\Db::i()->select( '*', 'paytopintopics_topics', array( "pinned=1 AND ptpt_status=? AND ptpt_limit<?", 'pinned', time() ), 'tid DESC', 25 )->join( 'forums_topics', 'paytopintopics_topics.ptpt_topic_id=forums_topics.tid' );
			if ( !$sql->count() )
			{
				return FALSE;
			}

There's only one ptpt_status column in the app and it's not duplicated in the query, etc.

You probably still have these columns in your topics table from the old plugin; it should have been dropped. Make sure you don't have them in forums_topics table. If you have, drop them. Let me know if you need help to check and drop the columns.

10 hours ago, Adriano Faria said:

Not sure how you're getting this error:

	public function execute()
	{
		$this->runUntilTimeout( function()
		{
			$sql = \IPS\Db::i()->select( '*', 'paytopintopics_topics', array( "pinned=1 AND ptpt_status=? AND ptpt_limit<?", 'pinned', time() ), 'tid DESC', 25 )->join( 'forums_topics', 'paytopintopics_topics.ptpt_topic_id=forums_topics.tid' );
			if ( !$sql->count() )
			{
				return FALSE;
			}

There's only one ptpt_status column in the app and it's not duplicated in the query, etc.

You probably still have these columns in your topics table from the old plugin; it should have been dropped. Make sure you don't have them in forums_topics table. If you have, drop them. Let me know if you need help to check and drop the columns.

 

Help finding if they exist and dropping them is appreciated

steve

  • Author
23 minutes ago, misfit76 said:

 

Help finding if they exist and dropping them is appreciated

steve

Send a message with ACP credentials. I’ll take a look tomorrow in the morning. 

  • 3 months later...

If we uninstall the app and reinstall it, will we lose purchase history on member accounts? We're still having the issue where expired invoices do not force the button to reappear within topics, so we're resorting to just doing a fresh install at this point. We've lost a lot of revenue from this in the last 3 months.

  • Author
4 minutes ago, ahc said:

If we uninstall the app and reinstall it, will we lose purchase history on member accounts?

No.

@ahc Wait!

You mean purchase on MARKETPLACE or topics pinned via this app?

Edited by Adriano Faria

1 minute ago, Adriano Faria said:

No.

Thanks, but when I try to uninstall it, I receive this error.

e36fc8d536eb60c134f17518bbbbf15b.png

  • Author
4 minutes ago, Adriano Faria said:

No.

@ahc Wait!

You mean purchase on MARKETPLACE or topics pinned via this app?

If you mean TOPICS PINNED, of course you need to make a backup of the tables of this app and restore it after reinstall.

Edited by Adriano Faria

3 minutes ago, Adriano Faria said:

If you mean TOPICS PINNED, of course you need to make a backup of the table of this app.

No, I meant if we view the purchase history of a member on our site, will it still show when they purchased pins in the past? We currently only have 3 topics pinned which I will manually re-pin myself. Unless I go in and manually change the expired invoices to cancelled, people can't pin their topics (most of our members keep the same topic for a long time and just re-pin it multiple times) and I don't really have the time to do that, which is why I'm resorting to this option.

I haven't uninstalled it yet per the error above.

Edited by ahc

  • Author
1 minute ago, ahc said:

No, I meant if we view the purchase history of a member, will it still show when they purchased pins in the past? We currently only have 3 topics pinned which I will manually re-pin myself. Unless I go in and manually change the expired invoices to cancelled, people can't pin their shops and I don't really have the time to do that, which is why I'm resorting to this option.

I haven't uninstalled it yet per the error above.

Oh yes, it will. On \IPS\Application:

		...
		\IPS\Db::i()->delete( 'core_member_history', array( 'log_app=?', $this->directory ) );
		...

If you want to keep these records, I suggest you to comment this line, uninstall the app and then revert the file edit after/before reinstall. This, of course, if you have access to FTP in your server.

Let me know if you want more detailed info. I can send a message.

34 minutes ago, Adriano Faria said:

Oh yes, it will. On \IPS\Application:

		...
		\IPS\Db::i()->delete( 'core_member_history', array( 'log_app=?', $this->directory ) );
		...

If you want to keep these records, I suggest you to comment this line, uninstall the app and then revert the file edit after/before reinstall. This, of course, if you have access to FTP in your server.

Let me know if you want more detailed info. I can send a message.

I currently don't. I've been waiting over a month to regain access with no response with my server host since my old credentials are no longer working. If we can't keep the records, it wouldn't be the end of the world.

However, the app is no longer working after attempting to uninstall it and it failing.

On 12/16/2021 at 2:13 PM, ahc said:

Thanks, but when I try to uninstall it, I receive this error.

e36fc8d536eb60c134f17518bbbbf15b.png

Any way to get around this would be appreciated. I'm still unable to uninstall.

  • Author

I have no idea what happened there. Uninstall is a Core method.

Did you check the logs? Anything related to this app?

If not, delete its folder from /applications, its tables and its record from core_applications and rebuild the cache.

Send a message if you want me to do it Monday morning. 

Edited by Adriano Faria

41 minutes ago, Adriano Faria said:

I have no idea what happened there. Uninstall is a Core method.

Did you check the logs? Anything related to this app?

If not, delete its folder from /applications, its tables and its record from core_applications and rebuild the cache.

Send a message if you want me to do it Monday morning. 

I think I can save you the trouble and do this myself if you can expand on "rebuild the cache" a little bit more. I know where to find the folder, tables, and records within the core_applications table.

  • Author
1 hour ago, ahc said:

I think I can save you the trouble and do this myself if you can expand on "rebuild the cache" a little bit more. I know where to find the folder, tables, and records within the core_applications table.

ACP -> System -> Support->Clear system caches.

21 hours ago, Adriano Faria said:

ACP -> System -> Support->Clear system caches.

Ah, that's what I thought, but wanted to make sure. Let me try this and I'll check back in.

2 hours ago, ahc said:

Ah, that's what I thought, but wanted to make sure. Let me try this and I'll check back in.

Everything seems to be a-ok. Hoping this resolves the expired invoice issue we were having before. Thanks for the help. 🙂

  • 3 weeks later...

@Adriano Faria , some topics still dont have "pin" option. it doesnt show. ive tried all methods. like some are blacklisted?

  • Author

Check if there pending invoices to the topic. The topic will be available again when:

1: if paid, when the number of days is pssed

2: when the invoice is expired, canceled or deleted.

There’s a setting in Commerce to control the number of days the invoice will expire. Default is 30 days, IIRC. 

  • 6 months later...

I'm trying to buy this via Marketplace from AdminCP, and for the life of me I can't get it to show so I can purchase. Any ideas?

  • Author
4 minutes ago, Emediate said:

I'm trying to buy this via Marketplace from AdminCP, and for the life of me I can't get it to show so I can purchase. Any ideas?

I just noticed it’s not tested on 4.7 yet and not marked as compatible that’s why it doesn’t show. Will test it tomorrow. 

Just now, Adriano Faria said:

I just noticed it’s not tested on 4.7 yet and not marked as compatible that’s why it doesn’t show. Will test it tomorrow. 

I'm not running 4.7 though. Still on 4.6.

On 7/28/2022 at 9:47 AM, Emediate said:

I'm trying to buy this via Marketplace from AdminCP, and for the life of me I can't get it to show so I can purchase. Any ideas?

Just an update. It comes up when you search exactly "pay to pin topics" with the inverted commas 🙂

Recently Browsing 0

  • No registered users viewing this page.