Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 6
Seite [1]
bpnza101


Wannabe poster




Beiträge: 27
# Thema - 17.01.2014 um 17:14 Uhr
Hey guys

I have the Cup Module installed on my website but now when I start a cup.. It seems hard for players to communicate through the website.. So I was hoping that I can change a few text fields..

Please look below:



I would like to replace:
ICQ with Steam Profile URL (example: http://steamcommunity.com/profiles/76561197992945413)

and

Jabber with Steam ID

Please could you tell me which files to edit.. i'm sure I have to edit 2 files.. I'm guess this because you gotta edit profile and view profile..

Many thx

Oh yes... I did search other threads before I thought of posting this but 90% of them are in another language which my google translate doesn't translate and some threads are very old.


Zuletzt editiert von bpnza101 am 17.01.2014 um 17:53 Uhr (1x Editiert)
Inaktiv
Tom08 ClanSphere Team

Supporter
Supporter



Herkunft: Daheim
Beiträge: 2923
# Antwort: 1 - 18.01.2014 um 00:00 Uhr
Hey,

nearly everything is in German which Google could translate to English but this is nothing so great:

We have different types of files:

Language Files
These files are in /lang/[yourlanguage]/[module].php, so in this case the users.php. Here are the names like Homepage, ICQ, Jabber defined.

mods files
/mods/[module]/*.php, in this case /mods/users/*.php

These files do all the work between database and view (taking data from the database and show them, insert/edit entries in the database). Here are the link to icq, jabber and skype defined. For each action exists a file. Typical names:
- List: List all entries
- Edit: Edit an entry
- Create: Create a new entry
- View: View an entry

So, at least you have to change the links in the view.php and might take a look at the edit/create, whether there are some casts to int (i.e. at icq) [which is not done in this case].

Theme Files
/themes/[themeset, typical base]/[module]/*.tpl
These are some kind of html-Files (even if they have the extension *.tpl). These contain variables which are replaced by the mods-Files with the data. Mostly for each *.php in mods exists a corresponding *.tpl.

Database
Take a look at the defined database columns, as i.e. the icq-column in {pre}_users is defined as int(12). So it would just be possible to save numbers in this field. In your case you have to change it to varchar(20) or somthing similar, which allows you to store alphanumeric signs.

I hope this helps you to understand the system.

So, you have to edit for your users:
- edit
- view

For you as Administrator of the page, if you use the possibility to create users via acp, also the create would be necessary. But in most cases the people use the registry and you don't need this function :-)

Nice evening


------------------
Bei Problemen mit Code von mir bitte eine Private Nachricht an mich


Inaktiv
|
coldicee


Beginner




Beiträge: 2
# Antwort: 2 - 19.05.2014 um 00:00 Uhr
Work is done.

Please see the attached ZIP file.

Readme:
extended-profile-sql.sql - run this SQL to create the necessary fields in the SQL. NOTE: I'M USING DEFAULT NAMING SCHEME FOR MY TABLES, THEY START WITH CS_ - YOU MAY HAVE TO REPLACE THESE FIELD IN THE SQL-FILE.

I do not provide support for this package, you can use it as you wish.
I did only support the default BASE-theme.


Also Tom08, this is the worst code I've ever worked with... such a mess! Also the SQLs are horrible...

New attached two posts below.


Zuletzt editiert von coldicee am 25.05.2014 um 19:22 Uhr (2x Editiert)
Inaktiv
|
Tom08 ClanSphere Team

Supporter
Supporter



Herkunft: Daheim
Beiträge: 2923
# Antwort: 3 - 19.05.2014 um 10:34 Uhr
19.05.2014 um 00:00 Uhr - coldicee:
Also Tom08, this is the worst code I've ever worked with... such a mess! Also the SQLs are horrible...

Yeah, the development of Clansphere started back in 2006. Some things weren't changed since this time. But at least we changed it some years ago to have a themes engine. And we didn't use OOP, because it wasn't that popular the years ago. We haven't replaced all the SQL query to another format which is today more accurate. In the sucessor "cSphere", which is currently in development (you find it on github), i think we did a better job.


------------------
Bei Problemen mit Code von mir bitte eine Private Nachricht an mich


Inaktiv
|
coldicee


Beginner




Beiträge: 2
# Antwort: 4 - 25.05.2014 um 19:21 Uhr
I've fixed a few bugs, added icons.
see new attached file:
Dateianhänge:
zip extended-userprofiles.zip (54.36 KiB - 52 mal heruntergeladen )


Inaktiv
|
itsmeJAY


Rock the board





Beiträge: 56
# Antwort: 5 - 29.03.2015 um 22:38 Uhr
Kurze Frage auf Deutsch: Weshalb sagt er, dass es der schlechteste Code sei mit dem er jemals gearbeitet hat? Auf was bezogen?


Inaktiv
|
Deaktiviert

Supporter
Supporter



Beiträge: 1287
# Antwort: 6 - 29.03.2015 um 22:59 Uhr
In den letzten 9 Jahren hat sich in die Richtung einiges getan, um es kurz zu fassen. Der Code ist einfach in die Jahre gekommen und auch manche Datenbank Abfragen sind suboptimal geschrieben.


Inaktiv
|
Antworten: 6
Seite [1]


Sie müssen sich registrieren, um zu antworten.