COMMUNITY FORUM
How do I hack the url field to show numbers?
- Muhammad Shoaib Ali
- Topic Author
- Offline
- Junior Member
- Infinity is something we cannot calculate yet.
Less
More
12 years 11 months ago #58957
by Muhammad Shoaib Ali
The only reason why we say something is infinity is because we cannot calculate it yet…and there are some things we will never be able to calculate.
How do I hack the url field to show numbers? was created by Muhammad Shoaib Ali
:cheer: Hi Guys,
I changed the comments area into an inquiry form and renamed the url field to Mobile Number. In the admin area I renamed the url title in the table to Mobile Number. I have just realised that the url field doesnot show the mobile number in the admin comments area.
Please help....how do I get the url field in the comments to allow anyone to enter a number (it allows us to enter a number) and then shows the number in the admin comments area.
I changed the comments area into an inquiry form and renamed the url field to Mobile Number. In the admin area I renamed the url title in the table to Mobile Number. I have just realised that the url field doesnot show the mobile number in the admin comments area.
Please help....how do I get the url field in the comments to allow anyone to enter a number (it allows us to enter a number) and then shows the number in the admin comments area.
The only reason why we say something is infinity is because we cannot calculate it yet…and there are some things we will never be able to calculate.
Please Log in or Create an account to join the conversation.
- Muhammad Shoaib Ali
- Topic Author
- Offline
- Junior Member
- Infinity is something we cannot calculate yet.
12 years 11 months ago #58958
by Muhammad Shoaib Ali
The only reason why we say something is infinity is because we cannot calculate it yet…and there are some things we will never be able to calculate.
Replied by Muhammad Shoaib Ali on topic Re: How do I hack the url field to show numbers?
Changes Done So Far -
Result - Mobile Number (previously URL) still doesnot show when someone clicks comments in the back end eventhough it fills in the frontend and submits.
Extra Information - If I enter the Mobile Number (previously URL) directly into the database it shows up in the back end and has a link on it as such www.yourdomain.com/administrator/index.php/+971 50 555 5555.
Anyone have any ideas?
- Changed language files to show Mobile Number where ever we had URL before.
- Changed the template and made the Mobile Number (previously URL) a required field.
- Edited the database url to be a text field insted of 255var field.
Result - Mobile Number (previously URL) still doesnot show when someone clicks comments in the back end eventhough it fills in the frontend and submits.
Extra Information - If I enter the Mobile Number (previously URL) directly into the database it shows up in the back end and has a link on it as such www.yourdomain.com/administrator/index.php/+971 50 555 5555.
Anyone have any ideas?
The only reason why we say something is infinity is because we cannot calculate it yet…and there are some things we will never be able to calculate.
Please Log in or Create an account to join the conversation.
- Jiliko.net
- Offline
- Platinum Member
Less
More
- Posts: 567
12 years 11 months ago #58959
by Jiliko.net
Replied by Jiliko.net on topic Re: How do I hack the url field to show numbers?
Hi Muhammad,
Maybe you should leave the K2 comment table as original (field name & type) because the field name is used as comment property in K2 code and i'm pretty sure if you change it, the comment url/mobile number can't be stored.
For the backend, what you can do is an override of the comments/comment template to display the Mobile Number with the format you want.
Overriding in backend works the same as frontend, you can override the comments list by copying the 'administrator/components/com_k2/views/comments/tmpl/default.php' file in 'administrator/yourjoomlatemplate/html/com_k2/comments/default.php'
Olivier
Maybe you should leave the K2 comment table as original (field name & type) because the field name is used as comment property in K2 code and i'm pretty sure if you change it, the comment url/mobile number can't be stored.
For the backend, what you can do is an override of the comments/comment template to display the Mobile Number with the format you want.
Overriding in backend works the same as frontend, you can override the comments list by copying the 'administrator/components/com_k2/views/comments/tmpl/default.php' file in 'administrator/yourjoomlatemplate/html/com_k2/comments/default.php'
Olivier
Please Log in or Create an account to join the conversation.
- Muhammad Shoaib Ali
- Topic Author
- Offline
- Junior Member
- Infinity is something we cannot calculate yet.
12 years 11 months ago #58960
by Muhammad Shoaib Ali
The only reason why we say something is infinity is because we cannot calculate it yet…and there are some things we will never be able to calculate.
Replied by Muhammad Shoaib Ali on topic Re: How do I hack the url field to show numbers?
Can it be done if I create a new field Mobile Number in the comments database table and then create it in the template...However Ill be lost with displaying this new field in the backend comments link.
Ill work on your suggestion and see how far I go with it.
Thanks Bro..All help appreaciated :).
Ill work on your suggestion and see how far I go with it.
Thanks Bro..All help appreaciated :).
The only reason why we say something is infinity is because we cannot calculate it yet…and there are some things we will never be able to calculate.
Please Log in or Create an account to join the conversation.
- Muhammad Shoaib Ali
- Topic Author
- Offline
- Junior Member
- Infinity is something we cannot calculate yet.
12 years 10 months ago #58961
by Muhammad Shoaib Ali
The only reason why we say something is infinity is because we cannot calculate it yet…and there are some things we will never be able to calculate.
Replied by Muhammad Shoaib Ali on topic Re: How do I hack the url field to show numbers?
All Done. Thanks Olivier.
I created the SQL table for the Mobile Number and linked it to the comments form template that I copied (like you suggested). All Working and displaying now :).
I created the SQL table for the Mobile Number and linked it to the comments form template that I copied (like you suggested). All Working and displaying now :).
The only reason why we say something is infinity is because we cannot calculate it yet…and there are some things we will never be able to calculate.
Please Log in or Create an account to join the conversation.
- Mirja Anders
- Offline
- New Member
Less
More
- Posts: 3
12 years 1 month ago #58962
by Mirja Anders
Replied by Mirja Anders on topic Re: How do I hack the url field to show numbers?
Hi Muhammad,
may you describe the way how you added the required field "mobile number"?
that would be great!! thank you in advance :)
may you describe the way how you added the required field "mobile number"?
that would be great!! thank you in advance :)
Please Log in or Create an account to join the conversation.