1
terryp3
Problem with catads
  • 2006/8/14 18:12

  • terryp3

  • Just popping in

  • Posts: 9

  • Since: 2006/8/14


hi, I seem to have a wee problem with the number of views being displayed for catads. Once views reach 127 the number sticks there and goes no further. Anyone any suggestions please?
Many thanks.

2
davidl2
Re: Problem with catads
  • 2006/8/14 18:27

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


There will be a variable somewhere set to "int" I think... I think one of the cleverer people round here will be able to help you change this to something more suitable, to handle larger numbers...

3
terryp3
Re: Problem with catads
  • 2006/8/14 18:32

  • terryp3

  • Just popping in

  • Posts: 9

  • Since: 2006/8/14


Thank you David, I shall await the cleverer people then.

4
terryp3
Re: Problem with catads
  • 2006/8/17 12:12

  • terryp3

  • Just popping in

  • Posts: 9

  • Since: 2006/8/14


Is there anyone out there with an answer, pwetty pwease.

5
zyspec
Re: Problem with catads
  • 2006/8/17 12:44

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


NOTE: I haven't tried this on an installed catads module but it SHOULD work.

==========================================================

If you edit line 33 in the /sql/mysql.sql file it will fix this for you. The easy change below will show up to 255 views instead of 127. If you want more than that then you'll need to change the declaration from a 'tinyint' to an 'int'....

Change line 33 from:
`view` tinyint(2) NOT NULL default '0',

to:
`view` tinyint(2) UNSIGNED NOT NULL default '0',

After you make this change go to Admin > Modules and update the module.

6
terryp3
Re: Problem with catads
  • 2006/8/17 14:29

  • terryp3

  • Just popping in

  • Posts: 9

  • Since: 2006/8/14


Many thanks Zyspec. I've tried it with the 'int' statement as views are going to be more than 255 but nothings changed. I will try it exactly as you have it and see if it goes up that way and try for a fix when it hits the 255!

7
Djiman
Re: Problem with catads
  • 2006/8/17 17:07

  • Djiman

  • Just popping in

  • Posts: 91

  • Since: 2006/7/26


[edit} just saw your post after i posted mine.
So i edited, with the 'INT' statement should work fine.
i tried it on a test, it works fine.

8
terryp3
Re: Problem with catads
  • 2006/8/17 19:16

  • terryp3

  • Just popping in

  • Posts: 9

  • Since: 2006/8/14


I really appreciate your help on this, thanks.

I've done as suggested but can't shift the views from 127, it seems solidly stuck there. I've tested since and it won't have it.
I tried both suggestions, firstly to get to 255, nothing changed after updating module and then testing, then I tried the line : `view` int(2) UNSIGNED NOT NULL default '0',
Updated the module, tested and again sticking at 127.
You can see the actual views here : http://guzelcamli.co.uk/modules/catads/index.php
That's with the latest change.

Can someone tell me what I'm doing wrong?......before I award myself a dummy.

9
zyspec
Re: Problem with catads
  • 2006/8/17 22:53

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Now that I think about it you will probably have to uninstall the module and then re-install it to get it to work using the /sql/mysql.sql file - if you do this you will lose the data for this module.

In order to do this without uninstalling the module you'll have to use phpMyAdmin (or similar) and perform an SQL statement on the table...

WARNING: BACKUP YOUR DATABASE BEFORE YOU ATTEMPT THE FOLLOWING. YOU COULD SERIOUSLY 'DAMAGE' YOUR DATABASE IF YOU DO NOT DO THIS CORRECTLY.

Now, with the warning out of the way - to do this without uninstalling your module you'll need to go to phpMyAdmin and then select the table. Then Select the SQL tab and type the following:

ALTER TABLE xoops_catads_ads MODIFY view INT UNSIGNED NOT NULL

NOTE: The table name prefix (xoops_ in the statement above) will be different depending on the particular XOOPS installation.

10
Peekay
Re: Problem with catads
  • 2006/8/28 15:08

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


The point-n-click way to do this in PHPMyAdmin 2.6.1 is:

1) Select your XOOPS database in the drop-down menu in the left sidebar.

2) Click the 'xoops_catads_ads' link (your table prefix may not be 'xoops').

3) Click the 'pencil' icon alongside the item 'view' to edit that entry.

4) Change the 'Type' from 'TINYINT' to 'SMALLINT' (or even 'INT').

5) Press 'Save'.

SMALLINT (un-signed) enables you to store numbers ranging from 0 to 65,535. Which should cater for even the most popular classified ad!
A thread is for life. Not just for Christmas.

Login

Who's Online

349 user(s) are online (280 user(s) are browsing Support Forums)


Members: 0


Guests: 349


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits