xoops forums

Forum Index


Board index » All Posts (MaxIT)




MaxIT

Just popping in
Posted on: 2002/8/9 22:01
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#1

Re: Account re-activation required on Profile email changes

as usual, just copy the content of "html" folder on your root, it will overwrite only 1 file (edituser.php)


MaxIT

Just popping in
Posted on: 2002/8/8 8:00
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#2

Re: Account re-activation required on Profile email changes

for lazy people: HERE you can download this hack for RC3


MaxIT

Just popping in
Posted on: 2002/8/7 23:48
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#3

Re: Account re-activation required on Profile email changes

Quote:
Invalid email


do this, too:

change around line 163

$email = $myts->oopsStripSlashesGPC(trim($email));

to

$email = $xoopsUser->getVar("email");

and it will works (tested)


MaxIT

Just popping in
Posted on: 2002/8/7 11:13
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#4

Re: Account re-activation required on Profile email changes

Quote:
perhaps a rc3 hack

yes, you're right

I took a look at RC3's edituser.php but it's a lot different from previous version. I still didn't understand the logic. I bet a dev could give a suggest without spending too much time.


MaxIT

Just popping in
Posted on: 2002/8/6 19:29
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#5

Re: Account re-activation required on Profile email changes

Quote:
any ideas on how to make email field on edit profile to "read only"?

if you read the whole thread you'll see I published this hack

Quote:
In the waiting for this useful fix, I've skipped this problem by removing the option to change the email by XOOPS users (RC2-only hack)
etc.



MaxIT

Just popping in
Posted on: 2002/8/3 10:45
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#6

Re: How can I create a page with product names and descriptions in Xoops?

Quote:

rows:xoops_version.php
$$modversion['name ' ] = _ MI_PRODUCTS_NAME;
$$modversion['version ' ] = 1.00;
$$modversion['description ' ] = _ MI_PRODUCTS_DESC;

$modversion['dirname'] = "products";

rows: modinfo.php
// The name of this module
define("_MI_2SECTIONS_NAME", "products");
// To brief description of this module
define("_MI_2SECTIONS_DESC", "To add Products to the Product Catalogue.");


if you use MI_PRODUCTS_NAME and MI_PRODUCTS_DESC, define them instead than MI_2SECTIONS_ ones who are only an example for a constant name for a 'clone'

Quote:

// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "product";
$modversion['tables'][1] = "products";

This seems to fall over for me cos it wont create the new tables for some reason - I could have manually created them in phpmyAdmin but wasnt sure what the field values where...



go in /modules/sections/sql/mysql.sql: here's the script to build tables neeeded from sections module. If you change it in your new products module, when you 'install' it via XOOPS administration, tables will be automatically created. So instead of 'morphing' sections, try duplicating the whole directory /modules/sections, change MySQL files according to your new module scope (table name, primary, leave fields as they are at now) and iInstall it: XOOPS will create new tables for you.

Quote:

Do I not also need to edit admin\index.php because it has references in lines to:

function sections() { ////does this need to change?


better to change it ( to clear code) and all its calling in all your files under the /modules/YOURMODULENAME/ structure. Look and replace for "sections()" instead than "sections", otherwise you will get noyt only function but variable and cookie. You should change them too but make it step by step:


Quote:

$result = $xoopsDB->query("select secid, secname, image from ".$xoopsDB->prefix("sections")." order by secname") /////what does this change to?


if you didn't change fields name on mysql.sql file, you don't need to change anything here (at now: but if you decide to create a 'serious' module you should change them in mysql.sql and here too)

Quote:

Will also need to change line to include new module location name:

echo _MD_URLFORTHIS."<br>
<a href=\"".XOOPS_URL."/modules/<b>sections</b>/index.php?op=viewarticle&artid=$artid\">".XOOPS_URL."/modules/sections/index.php?op=viewarticle&artid=$artid</a>

Variables in \language\english\main.php and modinfo.php are easily changed.

It installed ok and worked to point where tried to add product but it didnt list it - the tables didnt create for xoops_product and xoops_products which is i suppose the problem - so I have what I want now but I want the above to work properly so the Products module is seperate from the sections module so if u have any ideas would appreciate it.



surely your problem is due to undefined constants for table names: if you define:

$modversion['tables'][0] = "product";
$modversion['tables'][1] = "products";

then modify mysql.sql changing
CREATE TABLE seccont
to
CREATE TABLE product
and changing
CREATE TABLE sections
to
CREATE TABLE products

Quote:


Sorry for the poor descriptions here....I am exhausted and know bugger all about PHP as you can tell i guess

This is the best way to learn programming: 'unmounting' code is funny exactly like destroying toys when you're children, just to discover how they're built


MaxIT

Just popping in
Posted on: 2002/8/2 22:53
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#7

Re: How can I create a page with product names and descriptions in Xoops?

Why don't you try to hack yourself an existing module?
If you need just a list with an image and a short description, you could use (i.e.) MyLinks as a base, and hack it removing those fields you don't need. Step by step you will reach the result.

An xoops.it user, without any knowledge of PHP or programming in general, has created a simple hack of MyLinks to complain his need to list "Associatons".

He has followed suggestions on what to change on files to have a perfect 'clone' without interferring with original version (suggestions are HERE, in italian, I will translate it if there's a need), and began to dig on files. Or you could download it and compare to original MyLinks files to discover how change and what.


MaxIT

Just popping in
Posted on: 2002/7/25 12:39
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#8

Re: Account re-activation required on Profile email changes

Quote:

goghs wrote:
Yes this makes sense.
Maybe we can add the logic like this:
when a user changes his email, his account will be disactivated, and then an email with activation code will be sent to his new email.
It can be an option.


A doubt came in my mind thinking about this logic: if you disable a user when he change email, waiting for a new activation click, what will happen if user has written a wrong email?

Whith this logic, his/her account will be disabled, and as long as he will not receive that new activation email sent to a wrong address, the user account will remain disabled!

possible solution:

- when user change the email address, the new activation code will be sent to both new & old email address.


MaxIT

Just popping in
Posted on: 2002/7/19 13:46
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#9

largest XOOPS site?

Which is the largest site using XOOPS, talking about number of members number/simultaneous visits?

I'd like know something more about XOOPS in a stressed situation due to intensive use like in a large community website.


MaxIT

Just popping in
Posted on: 2002/7/12 11:52
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#10

Re: Pre-moderating forums: an idea

In the waiting for publishing the announces in xoops.org news, and before all French go to 'le cote azurre' for weekend leaving their forums in the hands of trolls , forum readers should know in advance I've published first alpha version of this module:
you can download it HERE.

PS: this is an alpha, still not added functionality suggested in this thread, but they will do.



TopTop
(1) 2 3 »