OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
Show user name when someone add a book (0 viewing) 

BookLibary Component Support

Go to bottom Favoured: 0

Show user name when someone add a book

kikedv (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Show user name when someone add a book 14 Years, 3 Months ago
Karma: 0  
Hi, first of all, sorry for my english writing that it is not very good, but i hope you could understand my problem.

I have recently bought Booklibrary not for a shop, just for a small community with no bussiness goals. The reason of buying BookLibrary is because I would like to make possible that user can add books to library.

Therefore I would like two things:

1) When an user press "add book" button and fill up the information, the system could identify automatly the user and when the book is listing will show a new column with the name of the user who brings the information.

2) Make possible not to have to validate by the administrator when someone add a book.

At the first point I even tought in changing manually "Edition" to "Share by", and let the user to write his/her name by his/her own. But I prefer to make it easier because the average age is 50 and I think it is better if there is no need to do that and the user name is post automatly.

I think it should not be so difficult for someone with a minimum of knwonledge because I think it just to get the user name from data base and send it with the form. Then, open a new row in mysql line and show this information when listing the library.

Anyway, if someone could help me I would be really happy.

Thanks a lot
Enrique
Logged Logged
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8367
graph
User Offline Click here to see the profile of this user
Re:Show user name when someone add a book 14 Years, 3 Months ago
Karma: 102  
Hello Enrique,

First of all save backup all files what you will change.

Next this variant if you agree lost field "Edition"

1. Go to {yours site}/component/com_booklibrary/language/english.php
please change:
Code:


DEFINE('_BOOKLIBRARY_LABEL_EDITION', 'Edition'); 


to
Code:

DEFINE('_BOOKLIBRARY_LABEL_EDITION', 'Share by');



2. Go to {yours site}/component/com_booklibrary/booklibrary.php
find function "save_book_fe"

please change:
Code:


  //remove escaped slashes
  if(get_magic_quotes_gpc()) {
    $book->title = stripslashes($book->title);  
  }


to
Code:


  //remove escaped slashes
  if(get_magic_quotes_gpc()) {
    $book->title = stripslashes($book->title);  
  }
$book->edition = $my->username;
$book->published = 1 ;



3. Go to {yours site}/administrator/component/com_booklibrary/admin.booklibrary.php
find function "saveBook"

please change:
Code:


  //remove escaped slashes
  if(get_magic_quotes_gpc()) {
    $book->title = stripslashes($book->title);  
  }


to
Code:


  //remove escaped slashes
  if(get_magic_quotes_gpc()) {
    $book->title = stripslashes($book->title);  
  }
$book->edition = $my->username;
$book->published = 1 ;



And all what you asked for you must start work

For more fine implementation, please order custom version through this site "Contact form"

Thanks,
OrdaSoft team
Logged Logged
The administrator has disabled public write access.
kikedv (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Show user name when someone add a book 14 Years, 3 Months ago
Karma: 0  
It works great! It is enough for what i wanted. Thanks a lot. I am happy for having bought it.
Logged Logged
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8367
graph
User Offline Click here to see the profile of this user
Re:Show user name when someone add a book 14 Years, 3 Months ago
Karma: 102  
We will thanks, if you vote for us components at joomla.org

Thanks
OrdaSoft team
Logged Logged
The administrator has disabled public write access.
Go to top
»