Forums

Forums


Marketplace (en)

Forum for Marketplace, a Joomla! 1.0 classified ads component. Posts in english language.
Last post
Forums  » Marketplace (en)  » Administrators' frontend
Nooby

Nooby
9 posts
---
Location:
n.a.
01.04.2011 23:19

Administrators' frontend

Hello everyone:

I'm sorry to bother you again. The thing is that I would like to know if there is a way for an administrator to publish an add, that is waiting for confirmation, from the frontend. This is because I don't want to give all access to this administrator, I want it to only deal with publishing adds.

I hope you can understand what I meant. I'll be waiting any answers.

Thanks everyone for reading.




 
cro24all

cro24all
36 posts
---
Location:
Croatia
01.04.2011 23:48

Re: Administrators' frontend

So you need front Admin that can to publish ads?



 
Nooby

Nooby
9 posts
---
Location:
n.a.
02.04.2011 00:05

Re: Administrators' frontend

Not exsaclty. What I need is a way to show in the frontend the list of adds that are waiting for the aproval of an administrator to be published, so that he can aprove them from there.

I hope it's clearer now. Sorry if I'm making this too confusing.

Thanks for your time and colaboration




 
cro24all

cro24all
36 posts
---
Location:
Croatia
02.04.2011 00:24

Re: Administrators' frontend

hmm..something like select from where is...
With some coding is possible I think, but it can take my time.
I will tray do it tomorrow...




 
Nooby

Nooby
9 posts
---
Location:
n.a.
02.04.2011 02:41

Re: Administrators' frontend

I'd me more than grateful if you do find something. I'll keep trying myself also. Let's hope we get to something .

Edited by Nooby - 02.04.2011 02:42




 
cro24all

cro24all
36 posts
---
Location:
Croatia
03.04.2011 03:30

Re: Administrators' frontend

I gat what you like modify list.php and some extra search.php

1. Create admin of category in marketplace
2.save(make backup) of your list.php
3. put list.php in /components/com_marketplace
be note that with this modification Marketplace admin can search only unpublished ads.

Edited by cro24all - 03.04.2011 04:45




 
Nooby

Nooby
9 posts
---
Location:
n.a.
03.04.2011 03:59

Re: Administrators' frontend

Thank you very much for the help, but... I'm kind of lost

I've created an administrator, but I don't have the list_limit_admin.php nor search_limit_admin. I have to create those? or I'm supposed to have them?.

And, just tu check if I understood correctly. I have to copy the code you gave me around line 765 on show_ad.php, right?

Sorry to bother you sooooo much . I'll be waiting your response...




 
cro24all

cro24all
36 posts
---
Location:
Croatia
03.04.2011 04:38

Re: Administrators' frontend

No first solution don work corect

replace this in list.php line 175-181

// make sure that we only get the published ads
if ( $sWhereClause == "") {
if( $bAdminMode == true) { // admin
//$sWhereClause .= "";
//set serarch unpubli...
$sWhereClause .= " WHERE published=0";
}


Edited by cro24all - 03.04.2011 04:45




 
Nooby

Nooby
9 posts
---
Location:
n.a.
03.04.2011 05:25

Re: Administrators' frontend

Awsome... great work, really.

It works perfectly, I've already done what you said and the admin can see the unpublished adds in the frontend to authorise them. However, it can also see the published ones, is that normal? or did I miss something?

Thanks you so much for all the time that you are spending on this .




 
cro24all

cro24all
36 posts
---
Location:
Croatia
03.04.2011 14:49

Re: Administrators' frontend

not completely, it have return only unpublished in this case.

this is a final solution for now
Keep list.php of before and in
search.php
Ad this between line 84-132
include($mosConfig_absolute_path.'/components/com_marketplace/topmenu.php');
// ------------------------------------>
// get marketplace user data
$database->setQuery("SELECT * FROM #__marketplace_users WHERE userid = '$my->id' AND published = '1' AND date_begin = curdate() ORDER BY date_begin ASC, date_end ASC");
$marketplace_users = $database->loadObjectList();
$marketplace_users_entry_count = count( $marketplace_users);
$marketplace_users_isAdmin = $marketplace_users[0]->isAdmin;
$marketplace_users_isModerator = $marketplace_users[0]->isModerator;
$marketplace_users_categories = $marketplace_users[0]->categories;
//-->
$bAdminMode = false; // defined start value
if ( $marketplace_users_isAdmin == 1) {
$bAdminMode = true;
}
$bModeratorMode = false; // defined start value
if ( $marketplace_users_isModerator == 1) {
$token = strtok( $marketplace_users_categories, ',');
while( $token){
if ( $token == $ad_category) {
$bModeratorMode = true;
}
$token = strtok( ',');
}
}
//--------------------------------------->


Send me a email on cro24all@gmail.com I will send to you search.php

Edited by cro24all - 03.04.2011 14:57




 
cro24all

cro24all
36 posts
---
Location:
Croatia
03.04.2011 14:56

Re: Administrators' frontend

[quote]












 
Forums  » Marketplace (en)  » Administrators' frontend

Codingfish operates

italobikes.com
Community for friends of italian motorcycles

fuldany.de
Das soziale Netzwerk für Fulda (im Aufbau)