像ポップアップ機能(jpg)実装


投稿ツリー


前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 .2 | 投稿日時 2021/8/19 15:15
yamanba  サイトURL

なーお nWEBさんのdblog1は画像ポップアップできるようにしたいのですが・・・?
当方、D3diaryなのですが、どうしても、jQueryのプラグインを利用した画像ポップアップ機能(jpg)が出来ません。
※jQueryプラグインの prettyphoto や fancybox 等のプリロードを入れているのですが
HP立ち上げ時だけ機能していて、他のページに行くと機能しません。
D3diaryに画像ポップアップ機能を実装するにはどうしたらよろしいでしょうか?
http://yamanba.net/modules/d3diary/
お忙しいところ申し訳ございません。xoopsサイトが閉鎖なので、聞くところがございません。
どんな方法でも画像ポップアップができれば良いですので・・・
少しアドバイスお願いいたします。   yanabba

投票数:0 平均点:0.00
返信する
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2021/8/26 21:23
なーお  長老   投稿数: 1744

yamanbaさん、こんにちわ。

環境が全く書かれていないので、具体的なアドバイスは全くできませんが、xoopsをお使い何でしょうか?
xoops cube legacyをお使いだとしたら、そんなプリロードがあったような気がします。

私のサイトは、xpWikiモジュールの機能を使い、ブログのテンプレートを編集してポップアップさせています。

投票数:0 平均点:0.00
返信する
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2021/8/29 17:58
yamanba  サイトURL

んにちは、お世話になります。

お返事ありがとうございます。

prettyphoto や fancybox 等のプリロードを入れてあります。
HP立ち上げ時は、日記のプリロードは反応(ポップアップ)している(fancybox)のですが
日記の中の他ページに移動すると反応(ポップアップ)しません。
d3diary は、v0.51を使っています。
xpwikiv5.02を使っています。
具体的にブログのテンプレートをどのように編集すれば良いのでしょうか?
もしよろしければ、ご教授願い致します。

Distribution : XOOPS X(ten) 20181220
XC Legacyバージョン : XOOPS Cube Legacy 2.2.3 Beta 1
サーバー : Apache
PHPバージョン : 5.6.40
MySQLのバージョン : 5.7.17

よろしくお願いいたします。

投票数:0 平均点:0.00
返信する
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2021/8/29 18:27 | 最終変更
なーお  長老   投稿数: 1744

yamanbaさん、こんにちは。

先ほど、yamanbaさんの山行サイトを見ましたが、正常にポップアップされていました。他のモジュールを表示して戻ってきても出てましたよ。(firefoxで)

HypCommonの設定 のxpWikiレンダラー設定で、サイトワイドwikiヘルパーを有効にして、Wiki ヘルパー無効 選択にd3diaryのチェックを外した状態にし必要ないモジュールはチェックを入れた場合の説明です。

テンプレート detail.htmlの例です。Altsysを使って編集してください。(modules/xpwikiの部分はご自身の環境に応じて編集してください。)

今までサイトワイドwikiヘルパーを使っていない状況からスイッチすると、多くの場合は過去の記事の表示が相当に乱れると思います。ですのでこの案は参考程度に。
その他の方法については、ご自身で同様個所のテンプレート編集をトライしてください。(私はprettyPhotoなど他の方法を試したことがありません)

Everything is expanded.Everything is shortened.
  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
220
221
222
223
224
225
226
227
228
229
230
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<link rel="stylesheet" type="text/css" media="all" href="/modules/xpwiki/skin/loader.php?charset=Shift_JIS&amp;skin=default&amp;r=1&amp;src=main.css" charset="Shift_JIS" />
<script type="text/javascript" src="/modules/xpwiki/skin/loader.php?src=default.ja.js"></script> 
<link rel="stylesheet" type="text/css" media="all" href="/modules/xpwiki/skin/loader.php?skin=default&amp;r=1&amp;src=lightbox.css" /> 
<script type="text/javascript" src="/modules/xpwiki/skin/loader.php?src=lightbox.js"></script> 
 
<{if $mod_config.show_breadcrumbs}>
<div id="d3d_breadcrumbs">
    <a href="<{$xoops_url}>/">TOP</a>
    <{foreach from=$xoops_breadcrumbs key="i" item="item"}>
        <{* if $i!=0 *}>
        &nbsp;>&nbsp;
        <{if $item.url}>
            <a href="<{$item.url}>"><{$item.name}></a>
        <{else}>
            <{$item.name}>
        <{/if}>
        <{* /if *}>
    <{/foreach}>
</div>
<{/if}>
 
 
<div id="d3dWrap">
<{if $yd_layout=="left"}>
  <div id="d3dMainRight">
  <div id="d3dMainBodyRight">
<{elseif $yd_layout=="right"}>
  <div id="d3dMainLeft">
  <div id="d3dMainBodyLeft">
<{else}>
  <div id="d3dMainNoside">
  <div id="d3dMainBodyNoside">
<{/if}>
 
<!-- start module contents -->
<div class="item" style="border:0px ;">
    <p><a href="<{$xoops_url}>/userinfo.php?uid=<{$yd_uid}>">
    <{if $mod_config.use_name==1 && $yd_name}><{$yd_name}>
    <{else}><{$yd_uname}>
    <{/if}></a><{$smarty.const._MD_DIARY_PERSON}>
</p>
<div class="itemInfo" style="text-align:left;">
<img src="<{$xoops_url}>/modules/<{$mydirname}>/images/open<{$yd_openarea}>.gif" border=0 style="float:right;" />
<a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?req_uid=<{$yd_uid}><{$base_qstr}>" title="<{$smarty.const._MD_NEWDIARY}>" class="d3dlinkEntry" style="float:left;" ></a>
<a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?page=photolist&amp;req_uid=<{$yd_uid}><{$base_qstr}>" class="d3dlinkImage" title="<{$smarty.const._MD_NEWPHOTO}>" style="float:left;" ></a>
<{if $yd_day>0}>[<{$yd_year}>-<{$yd_month}>-<{$yd_day}>]&nbsp;
<{elseif $yd_month>0}>[<{$yd_year}>-<{$yd_month}>]&nbsp;<{/if}>
<{if $yd_param.mode=="category"}><{$smarty.const._MD_CATEGORY}>&nbsp;[<{$yd_param.cname}>]&nbsp;<{/if}>
<{if $yd_param.tag}><{$smarty.const._MD_TAG}>&nbsp;[<{$yd_param.tag}>]&nbsp;<{/if}>
<div>&nbsp;</div>
</div><!-- /itemInfo -->
</div><!-- /item -->
 
<div class="boxdate_base" style="clear:both;">
<span class="boxdate">
<div class="itemHead"><span class="itemTitle"><{$yd_data.year}><{* $smarty.const._MD_DATE_YEAR *}></span></div>
<div class="itemInfo"><span class="itemText"><{$yd_data.b_month}><{ *$smarty.const._MD_DATE_MONTH *}></span>
<span class="<{$yd_data.dclass}>"><{$yd_data.day}><{* $smarty.const._MD_DATE_DAY *}></span></div>
<div class="itemHead"><span class="<{$yd_data.wclass}>">(<{$yd_data.week}>)</span></div>
<{* div class="itemFoot"><span class="itemText" *}><{$yd_data.time}><{* /span></div *}>
</span>
</div><!-- /boxdate_base -->
 
<div class="diaryHead">
<div class="item">
 
<div class="itemHead">
<span class="itemTitle">
<{$yd_data.title|escape}>
</span>
</div><!-- /itemHead -->
 
<div class="itemInfo" style="text-align:left;">
<span class="itemPermaLink" style="float:right;">
<{if $yd_before.bid >0}>
<a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?page=detail&amp;bid=<{$yd_before.bid}>&req_uid=<{$yd_uid}><{$base_qstr}>" title="<{$yd_before.title}>">
<img src="<{$xoops_url}>/modules/<{$mydirname}>/images/arrow2.png" border=0 style="vertical-align:middle;" /><{$smarty.const._MD_DIARY_LAST}>
</a>
<{/if}>
 
<{if $yd_after.bid >0}>
<a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?page=detail&amp;bid=<{$yd_after.bid}>&req_uid=<{$yd_uid}><{$base_qstr}>" title="<{$yd_after.title}>">
<{$smarty.const._MD_DIARY_NEXT}><img src="<{$xoops_url}>/modules/<{$mydirname}>/images/arrow1.png" border=0 style="vertical-align:middle;" />
</a>
<{/if}>
</span>
 
<{$smarty.const._MD_CATEGORY}>&nbsp;
<a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?req_uid=<{$yd_uid}>&amp;mode=category&amp;cid=<{$yd_data.cid}>">
<{$yd_data.cname}></a>
 
<{if $mod_config.use_tag>0}>
<br />
<{$smarty.const._MD_TAG}>&nbsp;
<{foreach from=$bTagArr item=tags}>
    <a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?req_uid=<{$yd_uid}>&amp;tag_name=<{$tags.tag_urlenc}>" style="font-size:<{$tags.size}>%"><{$tags.tag}></a> 
<{/foreach}>
<{/if}>
</div><!-- /itemInfo -->
 
</div> <!--end item -->
</div><!-- /diaryHead -->
 
<div class="itemDiary" style="clear:both;">
<div class="item">
 
<div class="itemInfo" style="text-align:left;">
<{$smarty.const._MD_DIARY_TEXT}>
</div><!-- /itemInfo -->
 
<div class="itemBody">
<div class="itemText">
 
<{$yd_data.diary}>
 
<{if $yd_photo.0.pid|count_characters>0}>
<div class="PhotoBox" style="clear:both;">
 <{foreach from=$yd_photo key="num" item="photo" name="list"}>
  <{if $photo.body_in != true}>
   <{if $yd_photo|@count==1}>
    <div class="d3dPhotoCenter">
   <{elseif ($yd_photo|@count==2)&&$num==1}>
    <div class="d3dPhotoRight">
   <{else}>
    <div class="d3dPhotoLeft">
   <{/if}>
  <a href="<{$xoops_url}>/modules/<{$mydirname}>/upimg/<{$photo.pname}>" type="img" rel="stack" title="<{$photo.info|escape}>" >
  <img src="<{$xoops_url}>/modules/<{$mydirname}>/upimg/<{$photo.thumbnail}>" style="border:1px solid gray;" title="<{$smarty.const._MD_PHOTO}><{$num+1}>"/></a>
  <p><{$smarty.const._MD_PHOTO}><{$num+1}></p>
  <{if $mod_config.photo_useinfo==1 && $photo.info}><p><{$photo.info}></p><{/if}>
  </div>
  <{if $num==2 || $num==5 }><div class="clear"></div><{/if}>
  <{* <{if $num==1 || $num==3 || $num==5 || $num==7 }><div class="clear"></div><{/if}> *}>
  <{/if}>
<{/foreach}>
</div><!-- /PhotoBox -->
 
<{/if}>
</div><!-- /itemText -->
</div><!-- /itemBody -->
 
<div class="itemFoot" style="clear:both;">
<span class="itemPermaLink">
 
<{* <{attachfile_attach_download dirname=attachfile target_id=$yd_data.bid}>&nbsp;|&nbsp; *}>
 
<{if $yd_editperm==1}>
<a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?page=edit&amp;bid=<{$yd_data.bid}><{$query_req_uid}>">
<{$smarty.const._MD_T_EDIT}></a>&nbsp;|&nbsp;
<{/if}>
<{$smarty.const._MD_T_VIEW}>(<{$yd_data.view}>)
</span>
</div><!-- /itemFoot -->
 
<{if $yd_data.can_disp!=true}>
    <font color="#FF0000"><{$smarty.const._MD_DIARY_NOPERMBODY}></font>
<{/if}>
</div> <!--end item -->
</div> <!--end itemDiary -->
 
<{if $yd_data.can_disp==true || $yd_data.can_disp_com==true }>
<!-- start comment area -->
<div class="d3d_d3com">
<{if $mod_config.comment_dirname}>
    <a name="comment"></a>
    <{d3comment mydirname=$mydirname id=$yd_data.bid subject=$yd_data.title class="d3diaryD3commentContent" posts_num=$mod_config.comment_posts_num}>
<{else}>
    <a name="viewcomment"></a>
  <{if $mod_config.use_simplecomment == 0}>
    <{$commentsnav}>
    <center><{$lang_notice}></center>
    <{if $comment_mode == "flat"}>
      <{include file="db:system_comments_flat.html"}>
    <{elseif $comment_mode == "thread"}>
      <{include file="db:system_comments_thread.html"}>
    <{elseif $comment_mode == "nest"}>
      <{include file="db:system_comments_nest.html"}>
    <{/if}>
 
  <{else}>
    <{if $comments.0.id >0}>
    <table class="outer"><tr><th>
    <{$smarty.const._MD_CATEGORY}>
    </th></tr><tr><td>
    <div style="margin: 1px; padding: 1px;">
    <!-- start comments loop -->
    <{include file="db:system_comments_flat.html"}>
    <!-- end comments loop -->
    </div>
    </td></tr></table>
    <br />
    <{/if}>
    <!-- start comment form -->
    <table class="outer"><tr><th>
    <{$smarty.const._MD_COM_WRITE}>
    </th></tr><tr><td>
    <{if $xoops_isuser==1}>
    <{$yr_comment_form}>
    <{else}>
    <{$smarty.const._MD_COM_HOWTOWRITE1}><a href="<{$xoops_url}>/user.php"><{$smarty.const._MD_COM_HOWTOWRITE2}></a><{$smarty.const._MD_COM_HOWTOWRITE3}><br />
    <{/if}>
    </td></tr></table>
    <!-- end comment form -->
    <!-- end comment area -->
  <{/if}>
<{/if}>
</div><!-- /d3d_d3com -->
<{/if}>
</div>
</div>
 
<{if $yd_layout=="left"}>
  <div id="d3dSideLeft">
  <{include file="db:`$mydirname`_rightarea.html"}>
  </div><!-- /d3dSidexxxx --> 
<{elseif $yd_layout=="right"}>
  <div id="d3dSideRight">
  <{include file="db:`$mydirname`_rightarea.html"}>
  </div><!-- /d3dSidexxxx --> 
<{/if}>
 
</div><!-- /d3dWrap --> 
<div class="clear"></div> 
 
<{include file='db:system_notification_select.html'}>
 
<{if $debug_time}>
 <{foreach from=$debug_time item="debug"}>
    <{$debug.time}>:<{$debug.caller}><br />
 <{/foreach}>
<{/if}>
投票数:0 平均点:0.00
返信する
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2021/8/29 20:31
yamanba  サイトURL

ありがとうございます。
早速、やってみたのですが、エラーが出てしまいました。

Warning: preg_match(): Empty regular expression in /home/otokotoonna/yamanba.net/public_html/xoops_trust_path/class/hyp_common/preload/hyp_preload.php on line 372

HypCommonFunc 関連の設定の
モバイル対応の設定で User agent (モバイル対応機能で処理する User agent を PCRE(Perl互換)正規表現で記述。)
の所で書いてあったのを消してしまったのが悪かったのでしょうか?

また、D3diaryの表紙画像が消えてしまい困っています。

よろしくお願いいたします。

すみません投稿場所を間違いました。

投票数:0 平均点:0.00
返信する
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2021/8/30 0:40
yamanba  サイトURL

すいません。補足です。
HypCommonFunc 関連の設定のメインスイッチから
モバイル対応機能を有効にするをいいえにすれば、エラーは出ませんでした。
でも、モバイル対応の設定のUser agentで、何が書いてあったのか思い出せません。

ポップアップができました。ありがとうございます。
jQueryプラグインの prettyphoto や fancybox のプリロードは、削除しても構わないでしょうか。
それと、d3diaryの画像を追加すると画像の下に
画像1 画像2 画像3・・・・・・と表示されますがこれを消すことは可能でしょうか。

たびたび申し訳ございません。
よろしくお願いいたします。

投票数:0 平均点:0.00
返信する
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2021/9/1 12:17
なーお  長老   投稿数: 1744

HypCommonの初期値設定は、別のサイトにインストールするなどして確認してください。

画像番号表示は、今回編集したテンプレートの中にありますので不要なら消してください。

投票数:0 平均点:0.00
返信する
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2021/9/1 19:58
yamanba  サイトURL

出来ました。ありがとうございました。
お時間を取らせてすみません助かりました。

また、よろしくお願いいたします。

投票数:0 平均点:0.00
返信する
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2021/9/2 4:40
なーお  長老   投稿数: 1744

よかったです。
画像一覧では、photolist.htmlに同じように細部を編集すれば可能です。もちろん他の一覧やブロックも。

投票数:0 平均点:0.00
返信する

このトピックに投稿する

題名
ゲスト名
投稿本文
  条件検索へ