Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 12
Seite [1]
aschti


Poststar





Beiträge: 778
# Thema - 03.02.2012 um 17:18 Uhr
Servus,

ich hab mal eine frage ich ich habe das komplette googlemap modul die letzten tage erneuert
alles funktionert usw hatte nur zum testen die anzahl der auszugebenen usern begrenzt zwecks der
übersichtlichkeit.

jetzt wo ich dabei bin das thema abzuschliesen damit ich die ersten testversionen rausrücken kann bin ich auf ein kleines prob gestoßen.

wenn ich unter der begrezung teste wie z.b.

 
1.
2.
3.
4.
5.
6.
1. / 2. / ... 
 $from 'access acc INNER JOIN {pre}_users usr ON acc.access_id = usr.access_id ';
$select '*'
$where 'users_delete = 0 AND users_active = 1 AND users_gmapaktiv =1';
$sort 'users_nick ASC';

$cs_access_users cs_sql_select(__FILE__,$from$select$where$sort,1,20);



funktioniert alles wenn ich aber die menge freigebe wie z.b

 
1.
2.
3.
4.
5.
6.
7.
1. / 2. / ... 
 $from 'access acc INNER JOIN {pre}_users usr ON acc.access_id = usr.access_id ';
$select '*'
$where 'users_delete = 0 AND users_active = 1 AND users_gmapaktiv =1';
$sort 'users_nick ASC';

$cs_access_users cs_sql_select(__FILE__,$from$select$where$sort,0,0);

bekomme ich die meldung:

PHP-Warning: Notice: Array to string conversion in /home/www-webs/web3/system/core/templates.php on line 45

und es wird nichts mehr ausgegeben.

Wäre nett wenn jemand mir dabei unter die Arme greifen könnte damit ich das ding endlich veröffentlichen kann ^^

Gruß Aschti


------------------
p.s. die oben zufindenen Rechtschreibfehler sind eine gratis beigabe ^^

www.DemolitionGroup.de
It's Time to Fight - Play Hard & Fair !
Inaktiv
ev0lution


Geekboy





Beiträge: 1102
# Antwort: 1 - 03.02.2012 um 18:02 Uhr
kann man die letzte 0 nicht einfach weg lassen ? kp nur idee eines ahnungslosen


------------------


Inaktiv
|
aschti
Thread-Ersteller


Poststar





Beiträge: 778
# Antwort: 2 - 03.02.2012 um 18:23 Uhr
schon versucht kommt die gleiche meldung ...


------------------
p.s. die oben zufindenen Rechtschreibfehler sind eine gratis beigabe ^^

www.DemolitionGroup.de
It's Time to Fight - Play Hard & Fair !


Inaktiv
|
Deaktiviert

Supporter
Supporter



Beiträge: 1287
# Antwort: 3 - 03.02.2012 um 18:50 Uhr
Lass beide hinteren 0en weg und danach wenn das nicht geht setzt mal ne 100-200. Ich vermute, dass LIMIT 0,0 nicht gehen kann und soll.


Inaktiv
|
aschti
Thread-Ersteller


Poststar





Beiträge: 778
# Antwort: 4 - 03.02.2012 um 19:01 Uhr
hab versucht es weg zulassen oder auch hochzudrehen auf ü 100 spasseshalber allerdings wird dann nichts mehr ausgegeben.

ist n würmchen drin ^^


------------------
p.s. die oben zufindenen Rechtschreibfehler sind eine gratis beigabe ^^

www.DemolitionGroup.de
It's Time to Fight - Play Hard & Fair !


Inaktiv
|
Deaktiviert

Supporter
Supporter



Beiträge: 1287
# Antwort: 5 - 03.02.2012 um 19:20 Uhr
Kein select *. Das mal zu allererst. Und poste mal den Rest zum coden, also die ganze PHP.


Inaktiv
|
aschti
Thread-Ersteller


Poststar





Beiträge: 778
# Antwort: 6 - 03.02.2012 um 19:25 Uhr
ich weiss ist nicht der schönste code bin noch an der optimierung dran aber funktioniern tuts zumindest mit begrenzung ^^


usersmap.php +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
1. / 2. / ... 
<?php

$cs_lang 
cs_translate('access');

$data['gm'] = array();
$data['gm_user'] = array();

$op_googlemaps cs_sql_option(__FILE__,'googlemaps');
$data['gm']['width'] = $op_googlemaps['width'];
$data['gm']['height'] = $op_googlemaps['height'];
$data_zoom $op_googlemaps['zoom'];
$data_navcontrol $op_googlemaps['navcontrol'];
if(
$data_navcontrol == 0){$data_navcontrol 'SMALL';}
if(
$data_navcontrol == 1){$data_navcontrol 'ZOOM_PAN';}

$data_view $op_googlemaps['view'];
if(
$data_view == 1){$data_view 'ROADMAP';}
if(
$data_view == 2){$data_view 'SATELLITE';}
if(
$data_view == 3){$data_view 'HYBRID';}
if(
$data_view == 4){$data_view 'TERRAIN';}


$from 'access acc INNER JOIN {pre}_users usr ON acc.access_id = usr.access_id ';
$select '*'
$where 'users_delete = 0 AND users_active = 1 AND users_gmapaktiv =1';
$sort 'users_nick ASC';

//anzahl fixen
$cs_access_users cs_sql_select(__FILE__,$from$select$where$sort,1,25);


//start verarbeitung
$data['gm']['include_a'] = "<script type=\"text/javascript\">";
$data['gm']['include_b'] = "
var mapOpts = {
            mapTypeControl: true,
            scrollwheel: false,
            scaleControl: true,
            keyboardShortcuts: false,                  
            navigationControl: true,
            mapTypeId: google.maps.MapTypeId.
$data_view,
            mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR},
            navigationControlOptions: {style: google.maps.NavigationControlStyle.
$data_navcontrol}
}

var map = new google.maps.Map(document.getElementById(\"map\"), mapOpts);
var infoWindow = new google.maps.InfoWindow();
var markerBounds = new google.maps.LatLngBounds();
var markerArray = [];
 
 

    google.maps.event.addListener(map, \"click\", function(){
    infoWindow.close();
    });


function SidebarItem(marker, opts){
    var tag = opts.sidebarItemType || \"button\";
    var row = document.createElement(tag);
    row.innerHTML = opts.sidebarItem;
    row.className = opts.sidebarItemClassName || \"sidebar_item\";  
    row.style.display = \"block\";
    row.style.width = opts.sidebarItemWidth || \"100%\";
    row.onclick = function(){
    google.maps.event.trigger(marker, 'click');
    }
    row.onmouseover = function(){
    google.maps.event.trigger(marker, 'mouseover');
    }
    row.onmouseout = function(){
    google.maps.event.trigger(marker, 'mouseout');
    }
    this.button = row;
    }

    SidebarItem.prototype.addIn = function(block){
    if(block && block.nodeType == 1)this.div = block;
    else
    this.div = document.getElementById(block)
    || document.getElementById(\"sidebar_gm\")
    || document.getElementsByTagName(\"body\")[0];
    this.div.appendChild(this.button);
    }

    SidebarItem.prototype.remove = function(){
    if(!this.div) return false;
    this.div.removeChild(this.button);
    return true;
}

"
;

//loop's
$call 1;
for(
$run 0$run <count($cs_access_users); $run++) {
if(
strlen($cs_access_users[$run]['users_gmapcoords']) > AND $cs_access_users[$run]['access_id'] >= $op_googlemaps['access']){

$user_coords $cs_access_users[$run]['users_gmapcoords'];

if(
$op_googlemaps['addinfo'] == 1){
$view_access $cs_access_users[$run]['access_name'] . "<br /><br />";
}else{
$view_access '';
}

if(
$op_googlemaps['addpic'] == 1){
$user_pic $cs_access_users[$run]['users_picture'];
$data_pic_height $op_googlemaps['pic_height'];
if(empty(
$user_pic)){
$user_picture "<div style=\"float:left;margin-right:10px\"><img width=\"$data_pic_height\" src=\"/uploads/users/picture-0.jpg><br /></div>";
}else{
$user_picture "<div style=\"float:left;margin-right:10px\"><img width=\"$data_pic_height\" src=\"/uploads/users/$user_pic\"><br /></div>";
}
}else{
$user_picture '';
}

if(
$op_googlemaps['viewflagg'] == 1){

$cs_users_country cs_secure($cs_access_users[$run]['users_country']);
$view_flagg "<img src=\"/symbols/countries/$cs_users_country.png\"> ";
}else{
$view_flagg '';
}

$view_user cs_user($cs_access_users[$run]['users_id'], $cs_access_users[$run]['users_nick'], $cs_access_users[$run]['users_active'], $cs_access_users[$run]['users_delete']);
$view_user_nick cs_secure($cs_access_users[$run]['users_nick']);
  
$view_plz cs_secure($cs_access_users[$run]['users_postalcode']);
$view_place cs_secure($cs_access_users[$run]['users_place']);
$view_street cs_secure($cs_access_users[$run]['users_adress']);

if(
$op_googlemaps['addplace'] == 1){
$view_placeinfo $view_plz.' '.$view_place.' '.$view_street."<br /><br />";
}else{
$view_placeinfo '';
}

if (
$cs_access_users[$run]['access_id'] == "5"){$data_markerpin "/" $op_googlemaps['point_w'];}
if (
$cs_access_users[$run]['access_id'] == "4"){$data_markerpin "/" .  $op_googlemaps['point_o'];}
if (
$cs_access_users[$run]['access_id'] == "3"){$data_markerpin "/" .  $op_googlemaps['point_m'];}
if (
$cs_access_users[$run]['access_id'] <= "2"){$data_markerpin "/" .  $op_googlemaps['point'];}

//user wiederholung
$set_call $call++;

$data['gm_user'][$run]['include_c'] = "
/*start_users*/
    function makeMarker
$set_call (options){
    var pushPin = new google.maps.Marker({
    draggable: false,
    animation: google.maps.Animation.DROP,
    map:map,
    icon: '
$data_markerpin',
    });
  
    pushPin.setOptions(options);
  
    google.maps.event.addListener(pushPin, \"click\", function(){
    infoWindow.setOptions(options);
    infoWindow.open(map, pushPin);
    if(this.sidebarButton)this.sidebarButton.button.focus();
    });
      
    var idleIcon = pushPin.getIcon();
    if(options.sidebarItem){
    pushPin.sidebarButton = new SidebarItem(pushPin, options);
    pushPin.sidebarButton.addIn(\"sidebar\");
    }
    markerBounds.extend(options.position);
    markerArray.push(pushPin);
    return pushPin;
}

var content_string = '<div id=\"infowindow\">
$user_picture<div style=\"float:left;\"><b>$view_flagg $view_user </b><i><br /><br />$view_access $view_placeinfo</div></i></div>';
makeMarker
$set_call ({
  position: new google.maps.LatLng(
$user_coords),
  title: '
$view_user_nick',
  sidebarItem: '
$view_flagg $view_user',
  content: content_string

});

/*end_users*/

"
;

}
}



//min & max zoom fix
$data['gm']['include_d'] = "

    google.maps.event.addListener(map, 'zoom_changed', function() {
    zoomChangeBoundsListener = 
    google.maps.event.addListener(map, 'bounds_changed', function(event) {
    if (this.getZoom() > 
$data_zoom && this.initialZoom == true) {
    this.setZoom(
$data_zoom);
    this.initialZoom = false;
    }
    google.maps.event.removeListener(zoomChangeBoundsListener);
    });
    });
    
    map.initialZoom = true;
    
    map.fitBounds(markerBounds);

"
;

//ende
$data['gm']['include_e'] = '</script>';

echo 
cs_subtemplate(__FILE__,$data,'googlemaps','usersmap');

?>


bsp mit begrenzung: http://demolitiongroup.de/index/googlemaps/usersmap


------------------
p.s. die oben zufindenen Rechtschreibfehler sind eine gratis beigabe ^^

www.DemolitionGroup.de
It's Time to Fight - Play Hard & Fair !


Zuletzt editiert von aschti am 03.02.2012 um 19:27 Uhr (1x Editiert)
Inaktiv
|
Fr33z3m4n ClanSphere Team


Medal of Honor




Herkunft: Hamm
Beiträge: 11094
# Antwort: 7 - 03.02.2012 um 19:39 Uhr
Zeig mal bitte deine tpl datei dazu.


------------------
mfg
Patrick "Fr33z3m4n" Jaskulski

Antoine de Saint-Exupéry: Wenn Du ein Schiff bauen willst, so trommle nicht Männer zusammen, um Holz zu beschaffen, Aufgaben zu verteilen, sondern lehre die Männer die Sehnsucht nach dem endlosen weiten Meer.

Inaktiv
|
aschti
Thread-Ersteller


Poststar





Beiträge: 778
# Antwort: 8 - 03.02.2012 um 19:40 Uhr
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
1. / 2. / ... 
 <table class="forum" style="width:{page:width}" cellpadding="0" cellspacing="1">
    <
tr>
        <
td class="headb">Forum - {lang:head_usersmap}</td>
    </
tr>
    <
tr>
        <
td class="leftb">
        
<
div style="width:{gm:width};height:{gm:height};">
    <
div id="map" style="width:85%; height:100%;float:left;" class="infowindow"></div>
    <
div id="sidebar_gm" class ="sidebar_style" style="width:15%;float:left;height:{gm:height};
"
></div>
</
div>

{
gm:include_a}
{
gm:include_b}

{
loop:gm_user}
{
gm_user:include_c}
{
stop:gm_user}

{
gm:include_d}
{
gm:include_e}

        </
td>
    </
tr>
</
table>


------------------
p.s. die oben zufindenen Rechtschreibfehler sind eine gratis beigabe ^^

www.DemolitionGroup.de
It's Time to Fight - Play Hard & Fair !


Inaktiv
|
Fr33z3m4n ClanSphere Team


Medal of Honor




Herkunft: Hamm
Beiträge: 11094
# Antwort: 9 - 03.02.2012 um 20:12 Uhr
mach mal bitte nach dem echo cs_template ein
 
1.
2.
1. / 2. / ... 
 echo '<pre>';
print_R($data);


und gib mal bitte die Ausgabe.

Also, wenn die Fehlermeldung kommt.


------------------
mfg
Patrick "Fr33z3m4n" Jaskulski

Antoine de Saint-Exupéry: Wenn Du ein Schiff bauen willst, so trommle nicht Männer zusammen, um Holz zu beschaffen, Aufgaben zu verteilen, sondern lehre die Männer die Sehnsucht nach dem endlosen weiten Meer.

Inaktiv
|
aschti
Thread-Ersteller


Poststar





Beiträge: 778
# Antwort: 10 - 03.02.2012 um 20:17 Uhr
habe das mal gemacht im verbund mit cs_sql_select 0,0

bekomme dann folgendes hab jetzt nur mal einen geschnappt ist aber ein bild mit drin

Array
(
[gm] => Array
(
[width] => 100%
[height] => 500px
[include_a] =>
)

[gm_user] => Array
(
[1] => Array
(
[include_c] =>
/*start_users*/
function makeMarker1 (options){
var pushPin = new google.maps.Marker({
draggable: false,
animation: google.maps.Animation.DROP,
map:map,
icon: '/symbols/googlemaps/blue-pushpin.png',
&#125;

pushPin.setOptions(options);

google.maps.event.addListener(pushPin, "click", function(){
infoWindow.setOptions(options);
infoWindow.open(map, pushPin);
if(this.sidebarButton)this.sidebarButton.button.focus();
&#125;

var idleIcon = pushPin.getIcon();
if(options.sidebarItem){
pushPin.sidebarButton = new SidebarItem(pushPin, options);
pushPin.sidebarButton.addIn("sidebar");
}
markerBounds.extend(options.position);
markerArray.push(pushPin);
return pushPin;
}

var content_string = '

19blue85

DG-Organisator

95694 mehlmeisel

';
makeMarker1 ({
position: new google.maps.LatLng(49.9756273,11.8571536),
title: '19blue85',
sidebarItem: ' 19blue85',
content: content_string

&#125;

/*end_users*/


also wenn ich mir die print ausgabe anschau wird obwohl nichts angezeigt wird zumiondest im print glaub ich alles wiedergegeben. und durch das 0,0 kommt wieder : PHP-Warning: Notice: Array to string conversion in /home/www-webs/web3/system/core/templates.php on line 45


------------------
p.s. die oben zufindenen Rechtschreibfehler sind eine gratis beigabe ^^

www.DemolitionGroup.de
It's Time to Fight - Play Hard & Fair !


Zuletzt editiert von aschti am 03.02.2012 um 20:57 Uhr (4x Editiert)
Inaktiv
|
Fr33z3m4n ClanSphere Team


Medal of Honor




Herkunft: Hamm
Beiträge: 11094
# Antwort: 11 - 03.02.2012 um 20:22 Uhr
ok, da seh ich schon einen Fehler.
Das Array fängt mit 1 an. Er muss aber mit 0 anfangen. Dir fehlt somit der erste index.

DAs Problem wird die IF Abfrage in der ersten Zeile vom Loop.
Diese wird beim ersten Datensatz nicht zutreffen.
Du müsstest also nicht $run für den Data index nutzen, sondern einen eigenen mitlaufen lassen, der sich halt nur erhöht, wenn auch die IF Abfrage zutrifft.


------------------
mfg
Patrick "Fr33z3m4n" Jaskulski

Antoine de Saint-Exupéry: Wenn Du ein Schiff bauen willst, so trommle nicht Männer zusammen, um Holz zu beschaffen, Aufgaben zu verteilen, sondern lehre die Männer die Sehnsucht nach dem endlosen weiten Meer.

Inaktiv
|
aschti
Thread-Ersteller


Poststar





Beiträge: 778
# Antwort: 12 - 03.02.2012 um 23:54 Uhr
ok danke für den tipp ich versuch mal die sache umzusetzten - ich berichte über erfolg & co ^^


------------------
p.s. die oben zufindenen Rechtschreibfehler sind eine gratis beigabe ^^

www.DemolitionGroup.de
It's Time to Fight - Play Hard & Fair !


Inaktiv
|
Antworten: 12
Seite [1]


Sie müssen sich registrieren, um zu antworten.