HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Help needed with an integrated log in

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#93490 (In Topic #18700)
Avatar

Fan in action

General questions about coding

Wondering if anyone can help with some coding questions? I'm using OCPortal and wish to integrate the log in system with another script called question2answer.
Question2answer has been designed to be able to integrate with other scripts, but some coding is required and I'm having difficulty understanding the code of OCPortal.
First I need to know the user id: function qa_get_mysql_user_column_type()
i.e does OCP use textual identifiers (i.e varchar 32) or unisgned numerical indentifiers in an Int unsigned
column?
(Need to enter either, return 'VARCHAR(32)'; or INT UNSIGNED or any of the following:
SMALLINT, SMALLINT UNSIGNED, MEDIUMINT, MEDIUMINT UNSIGNED, INT, INT UNSIGNED,
    BIGINT, BIGINT UNSIGNED or VARCHAR(x) where x is the maximum length)

Next i need to know about the login, out and register urls:
* Your Q2A site:       http://www.mysite.com/qa/
        * OCportal page:     http://www.mysite.com/login.php
        * OCP register page:  http://www.mysite.com/register.php
        * OCP logout page:    http://www.mysite.com/logout.php

(several options available but which do i use?)
Next, i need to know if OCP uses session based or cookie based login data?
Next, does OCP have a users table that contains emails (actually..which is the users table?)

I think that if anyone can help with any or all of the above i'll be able to muddle through the installation, so your help would be most appreciated.
Back to the top
 
Posted
Rating:
#93494
Avatar

Community saint

The users table is ocp_f_members.

Steve
Back to the top
 
Posted
Rating:
#93525
Avatar

Fan in action

Hi Sholzy, thanks for your help. I've been trying out many different portals to find one which is easier to understand to integrate the answers script, but I always run into trouble and find I never get any answer from the appropriate forums. As for Question 2 answers forum, they're a bit tight on imparting knowledge to newbies, prefering to tell you to learn php. (Forgetting I'd rather have this set up working in a few days rather than a few months!)
So far, i'm getting somewhere with OC portal, so not deleting it yet!
The instruction regarding the users table is as follows:
'You should return the appropriate MySQL column type to use for the userid,
    for smooth integration with your existing users.'
In the ocp_f_members table I see two possibilities, id int(10) unsigned in the id column or varchar (80) in the m_username column. Any ideas which the instruction above refers to?
Back to the top
 
Posted
Rating:
#93531
Avatar

Community saint

As much as I would like to be able to give you an answer to the other questions, I just don't have the programming knowledge. :( I can find my way around the database, but that is just about it. There are 2 or 3 members here who are more knowledgeable about the programming side of ocPortal, and I would be surprised if they didn't offer any assistance. Depending on how busy they are in their lives, it might take a day or two for them to show up here.

I don't know if these would be of any help in the mean time…
ocPortal Code Book - ocPortal.com
Tutorials - ocPortal.com


Steve
Back to the top
 
Posted
Rating:
#93533
Avatar

Community saint

id (int 10) is the one you want
Back to the top
 
Posted
Rating:
#93536
Avatar

Community saint

Or maybe only 8 minutes…  :lol:  :thumbs:

Steve
Back to the top
 
Posted
Rating:
#93537
Avatar

Community saint

I am not home till Monday or Tues and until then I can't help but if you can survive till then I could probably be of great assistance. Keep in mind most forums might be trying to point out to you that you will need to have a basic understanding of PHP if you intend to integrate one script to another as if you're not willing to learn some basics then you won't succeed without someone basically doing all the work for you. I am sure you have heard "give a man a fish feed him for a day teach him to fish feed him for life" before and this may be what people are trying to point out so you do need to start reading and trying things out and whenever you get stuck on something come ask for help but be patient for answers. Sometimes it can take up to 5 days to get answer (sometimes less than an hour) if you havent had help for 5days its usually ok give a small bump by then but chech the rules of the site first.
Back to the top
 
Posted
Rating:
#93543
Avatar

Fan in action

Thanks for your responses you've been very helpful, and sholzy thanks for those links. Going to have another go at setting it up shortly to see how far i get.
Duck, thanks again and yes I can wait but will also see how much further i can get armed with the info so far.
I do understand that learning is the only way to go, but it's nice when others assist. Unfortunately the Q2A forums are more intent on providing a response than providing an answer, and the data is usually very brief and more confusing, but more often than not i don't get a response at all. (still waiting for a response to a post I made around 5 weeks ago!)
Will update you on my progress, thanks again.
Back to the top
 
Posted
Item has a rating of 5 (Liked by sholzy)  
Rating:
#93544
Avatar

Fan in action

ps. I think OC portal is brill!
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: