get rid of html from mod_suggest
This commit is contained in:
		| @@ -18,7 +18,11 @@ function suggest_init(&$a) { | ||||
| } | ||||
| 		 | ||||
|  | ||||
| function suggest_aside(&$a) { | ||||
|  | ||||
| 	$a->set_widget('follow', follow_widget()); | ||||
| 	$a->set_widget('findpeople', findpeople_widget()); | ||||
| } | ||||
|  | ||||
|  | ||||
| function suggest_content(&$a) { | ||||
| @@ -31,37 +35,36 @@ function suggest_content(&$a) { | ||||
|  | ||||
| 	$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; | ||||
|  | ||||
| 	$a->page['aside'] .= follow_widget(); | ||||
| 	$a->page['aside'] .= findpeople_widget(); | ||||
|  | ||||
|  | ||||
| 	$o .= '<h2>' . t('Friend Suggestions') . '</h2>'; | ||||
|  | ||||
| 	$r = suggestion_query(local_user(),get_observer_hash()); | ||||
|  | ||||
| 	if(! $r) { | ||||
| 		$o .= t('No suggestions available. If this is a new site, please try again in 24 hours.'); | ||||
| 		return $o; | ||||
| 		info( t('No suggestions available. If this is a new site, please try again in 24 hours.')); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	$tpl = get_markup_template('suggest_friends.tpl'); | ||||
| 	$arr = array(); | ||||
|  | ||||
| 	foreach($r as $rr) { | ||||
|  | ||||
| 		$connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['xchan_addr']; | ||||
|  | ||||
| 		$o .= replace_macros($tpl,array( | ||||
| 			'$url' => chanlink_url($rr['xchan_url']), | ||||
| 			'$name' => $rr['xchan_name'], | ||||
| 			'$photo' => $rr['xchan_photo_m'], | ||||
| 			'$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['xchan_hash'], | ||||
| 			'$conntxt' => t('Connect'), | ||||
| 			'$connlnk' => $connlnk, | ||||
| 			'$ignore' => t('Ignore/Hide') | ||||
| 		)); | ||||
| 		$arr[] = array( | ||||
| 			'url' => chanlink_url($rr['xchan_url']), | ||||
| 			'name' => $rr['xchan_name'], | ||||
| 			'photo' => $rr['xchan_photo_m'], | ||||
| 			'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['xchan_hash'], | ||||
| 			'conntxt' => t('Connect'), | ||||
| 			'connlnk' => $connlnk, | ||||
| 			'ignore' => t('Ignore/Hide') | ||||
| 		); | ||||
| 	} | ||||
|  | ||||
| 	$o .= cleardiv(); | ||||
| //	$o .= paginate($a); | ||||
|  | ||||
| 	$o = replace_macros(get_markup_template('suggest_page.tpl'),array( | ||||
| 		'$title' => t('Channel Suggestions'), | ||||
| 		'$entries' => $arr | ||||
| 	)); | ||||
|  | ||||
| 	return $o; | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -4,18 +4,18 @@ | ||||
|  * | ||||
|  *}} | ||||
| <div class="profile-match-wrapper"> | ||||
| 	<a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide smalldrop profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a> | ||||
| 	<a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="icon drophide smalldrop profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a> | ||||
| 	<div class="profile-match-photo"> | ||||
| 		<a href="{{$url}}"> | ||||
| 			<img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" /> | ||||
| 		<a href="{{$entry.url}}"> | ||||
| 			<img src="{{$entry.photo}}" alt="{{$entry.name}}" width="80" height="80" title="{{$entry.name}} [{{$entry.url}}]" /> | ||||
| 		</a> | ||||
| 	</div> | ||||
| 	<div class="profile-match-break"></div> | ||||
| 	<div class="profile-match-name"> | ||||
| 		<a href="{{$url}}" title="{{$name}}">{{$name}}</a> | ||||
| 		<a href="{{$entry.url}}" title="{{$entry.name}}">{{$entry.name}}</a> | ||||
| 	</div> | ||||
| 	<div class="profile-match-end"></div> | ||||
| 	{{if $connlnk}} | ||||
| 	<div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}">{{$conntxt}}</a></div> | ||||
| 	{{if $entry.connlnk}} | ||||
| 	<div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}">{{$entry.conntxt}}</a></div> | ||||
| 	{{/if}} | ||||
| </div> | ||||
							
								
								
									
										14
									
								
								view/tpl/smarty3/suggest_page.tpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								view/tpl/smarty3/suggest_page.tpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| {{* | ||||
|  *	AUTOMATICALLY GENERATED TEMPLATE | ||||
|  *	DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN | ||||
|  * | ||||
|  *}} | ||||
| <h3>{{$title}}</h3> | ||||
|  | ||||
| {{if $entries}} | ||||
| {{foreach $entries as $child}} | ||||
| {{include file="suggest_friends.tpl" entry=$child}} | ||||
| {{/foreach}} | ||||
| {{/if}} | ||||
|  | ||||
| <div class="clear"></div> | ||||
| @@ -1,16 +1,16 @@ | ||||
| <div class="profile-match-wrapper"> | ||||
| 	<a href="$ignlnk" title="$ignore" class="icon drophide smalldrop profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a> | ||||
| 	<a href="$entry.ignlnk" title="$entry.ignore" class="icon drophide smalldrop profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a> | ||||
| 	<div class="profile-match-photo"> | ||||
| 		<a href="$url"> | ||||
| 			<img src="$photo" alt="$name" width="80" height="80" title="$name [$url]" /> | ||||
| 		<a href="$entry.url"> | ||||
| 			<img src="$entry.photo" alt="$entry.name" width="80" height="80" title="$entry.name [$entry.url]" /> | ||||
| 		</a> | ||||
| 	</div> | ||||
| 	<div class="profile-match-break"></div> | ||||
| 	<div class="profile-match-name"> | ||||
| 		<a href="$url" title="$name">$name</a> | ||||
| 		<a href="$entry.url" title="$entry.name">$entry.name</a> | ||||
| 	</div> | ||||
| 	<div class="profile-match-end"></div> | ||||
| 	{{ if $connlnk }} | ||||
| 	<div class="profile-match-connect"><a href="$connlnk" title="$conntxt">$conntxt</a></div> | ||||
| 	{{ if $entry.connlnk }} | ||||
| 	<div class="profile-match-connect"><a href="$entry.connlnk" title="$entry.conntxt">$entry.conntxt</a></div> | ||||
| 	{{ endif }} | ||||
| </div> | ||||
							
								
								
									
										9
									
								
								view/tpl/suggest_page.tpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								view/tpl/suggest_page.tpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| <h3>$title</h3> | ||||
|  | ||||
| {{ if $entries }} | ||||
| {{ for $entries as $child }} | ||||
| {{ inc suggest_friends.tpl with $entry=$child }}{{ endinc }} | ||||
| {{ endfor }} | ||||
| {{ endif }} | ||||
|  | ||||
| <div class="clear"></div> | ||||
		Reference in New Issue
	
	Block a user